-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
feat(driver): TypedPropertiesDriver support virtual property getter #1487
feat(driver): TypedPropertiesDriver support virtual property getter #1487
Conversation
e0454c5
to
e18df85
Compare
33c3b40
to
b19521c
Compare
a43bf4f
to
c35a532
Compare
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.
Thanks for contribution!
Code looks great, I left one small comment. :)
* @return string[] | ||
*/ | ||
#[Serializer\VirtualProperty] | ||
public function getArrayOfIntegers(): array |
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.
Name seems to be a bit misleading. :) Can we rename it?
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.
Sorry I changed the type of value while doing it, forgot to change the method name.
Done !
c35a532
to
7ff5b64
Compare
I am using it on a project, I have a issue while removing all Type definition. I'll put this back to ready to review after. |
@scyzoryck It seems that the issue I have is not related to my change. I am in symfony context, I have use the jms_serializer.metadata.infer_types_from_doc_block = true which is new (didn't use it before). I get an error from the DocBlockTypeResolver that is trying to parse
|
Thank you |
This allow to extract return type of virtual property when they are a getter on the class.
Same logic as a type properties but also supporting virtual property getter.
Also support type from php doc for virtual property getter.