-
Notifications
You must be signed in to change notification settings - Fork 222
Add private property annotations from inherited classes #675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add private property annotations from inherited classes #675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good to me 👍
@IceShack Out of curiosity: I can't quite follow, why you want the properties private, if they are publicly accessed later? |
@akomm I use getter/setter methods to access properties. Which looks like this: <?php
use Overblog\GraphQLBundle\Annotation as GQL;
class Product
{
/**
* @var string
*
* @GQL\Field(type="String!")
*/
private string $name;
public function getName(): string
{
return $this->name;
}
public function setName(string $name): Product
{
$this->name = $name;
return $this;
}
} |
Hey @mcg-web ! It's not a new feature, it's a fix. Previously, annotations on private properties on a parent class were not found (they were supposed to be). This PR fixed this issue. |
Hey @Vincz thanks for your answer so maybe we should make the change from 0.12 if it is a fix related to annotations ? |
@mcg-web Yes, definitely 👍 |
cherry-pick commits from original #675 fix proposed for 0.13
Annotations from private properties from inherited classes got ignored, because they didn't get checked.