-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Better inline requirements and defaults parsing #40755
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
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Thank you for your PR, @Foxprodev! I haven't reviewed your changes yet, but I noticed that you're about to submit a bugfix against the 5.x branch. Please note that we usually fix bugs on the lowest maintained branch that suffers from the bug. We currently maintain the branches 4.4 and 5.2, so if the bug is present there, please target one of those branches instead. |
@derrabus Thanks, it makes sense. Well, I am going to test with 4.4 and rework branch according 4.4 version then 😞 |
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.
Done. No idea how to restart checks. Maybe an empty commit or amend?
Remove ! symbol from requirements and defaults array keys in Route class. Leave ! symbol in Route compiled path for correct token creation Added some inline route settings tests
2f68094
to
2a8c94a
Compare
Thank you @Foxprodev. |
Remove
!
symbol from requirements and defaults array keys in Route class. Leave!
symbol in Route compiled path for correct token creation.The only restriction I found:
Important variable can't get default value, only in UrlGenerator.
As mentioned in
symfony/src/Symfony/Component/Routing/RouteCompiler.php
Line 217 in 0f96ac7
they are not optional
Feel free to help me with some advice. Thank you in advance