-
-
Notifications
You must be signed in to change notification settings - Fork 438
php8 attributes support for generated controllers #725
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
php8 attributes support for generated controllers #725
Conversation
weaverryan
left a comment
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.
Minor comments!
I think we should kill/fix ALL the @Route in this one PR:
git grep '@Route' src/Resources/skeleton
It's only 3 other templates I think.
tests/fixtures/MakeControllerAttributes/tests/GeneratedControllerTest.php
Outdated
Show resolved
Hide resolved
6ac4fae to
c6eba1c
Compare
| * | ||
| <?php if ($use_attributes) { ?> | ||
| */ | ||
| #[Route('', name: 'app_forgot_password_request')] |
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.
the empty '' path was added on purpose when we first created this maker - but I don't remember exactly why we decided to do this. Will investigate and adjust accordingly under a separate issue.
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.
I also can't remember... it may have been that / here would have made the final URL have a trailing slash - /reset-password/
| * | ||
| <?php if ($use_attributes) { ?> | ||
| */ | ||
| #[Route('', name: 'app_forgot_password_request')] |
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.
I also can't remember... it may have been that / here would have made the final URL have a trailing slash - /reset-password/
a3e1ea8 to
75532b5
Compare
|
Thank you Jesse! |
When using PHP8, Maker Bundle uses route attributes in the generated controllers instead of annotations.
As Doctrine/ORM does not currently have PHP8 support, we are unable to test the route functionality for
crud,registration-form, &reset-password. No additional tests should be needed when Doctrine is PHP8 compatible.