-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Showed an example of using container parameters in route requirements #6505
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
@javiereguiluz I like that. But I'm not 100% sure this feature existed in symfony 2.3 ; Can someone confirm it worked in 2.3 ? |
|
||
The route requirements can also be defined as container parameters, which | ||
comes in handy when the regular expression is very complex and used time and | ||
again in your application: |
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 would end this paragraph with a dot.
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. Thanks.
👍 |
Please note tha twe have a cookbook article on this: http://symfony.com/doc/current/cookbook/routing/service_container_parameters.html I think we can reduce this tip directive to a small explanation and a link to the cookbook article. So for now, I'm a bit 👎 |
I'm closing this because as @wouterj showed, this would be a duplicated documentation. |
Oh indeed, I completely missed that article. @javiereguiluz Nonetheless, adding a link to the cookbook as suggest by Wouter sounds like a good idea to me. |
Following this discussion symfony/symfony#18599 I thought it may be useful to add @lyrixx's comment (symfony/symfony#18599 (comment)) as an example in the docs.