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
Embedded classes reflection new instance creation with internal PHP classes #1207
Embedded classes reflection new instance creation with internal PHP classes #1207
Conversation
… is able to interact with internal PHP classes
… and should therefore extend it for type compatibility
… will not crash reading properties, but will return `null` instead
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3431 We use Jira to track the state of pull requests and the versions they got |
…tion-new-instance-creation Embedded classes reflection new instance creation with internal PHP classes
@@ -28,36 +31,62 @@ | |||
* | |||
* TODO: Move this class into Common\Reflection | |||
*/ | |||
class ReflectionEmbeddedProperty | |||
class ReflectionEmbeddedProperty extends ReflectionProperty |
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.
why extending ReflectionProperty ?
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.
@stof this embedded property reflection should be usable in any context where you'd use a ReflectionProperty
instead.
I noticed this requirement when adding the type-hints at line 56: $parentProperty
and $childProperty
can be either a ReflectionProperty
or a ReflectionEmbeddedProperty
No description provided.