-
Notifications
You must be signed in to change notification settings - Fork 702
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 support for native PHP8 QueryParam, FileParam and RequestParam attributes #2327
Conversation
* @param mixed $default | ||
*/ | ||
public function __construct( | ||
string $name = '', |
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.
Shouldn't we add bc layers for these classes, like symfony does?
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.
@GuilhemN I guess you refer to the BC layer for the Route
annotation.
I'm not sure how such BC layer should look like here.
Before my changes the constructor of the annotations were just empty.
Since all newly added parameters have default values it is still possible to call new QueryParam()
and the behavior of this call should not change.
9c91371
to
b65ea9a
Compare
How about making the annotations reader for the |
Good idea. Thank you for the hint! See a0377b2 |
Amazing feature, this will help us, to use PHP Attributes instead of annotations (we need to import the Class, but looks like unused import). |
@W0rma do you have anything to add to this PR? I personally think that is fine and I would like to proceed with the merge, what do you think? |
a0377b2
to
cb42f25
Compare
@goetas I tested my branch in a real life project and it worked fine. Therefore, I think it can be merged. I'm looking forward to the next release with symfony6 and full attribute support :) |
Closes #2301