8000 Showed an example of using container parameters in route requirements by javiereguiluz · Pull Request #6505 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

javiereguiluz
Copy link
Member

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.

@lyrixx
Copy link
Member
lyrixx commented Apr 21, 2016

@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 ?

@ogizanagi
Copy link
Contributor


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:
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

@xabbuh
Copy link
Member
xabbuh commented Apr 21, 2016

👍

@wouterj
Copy link
Member
wouterj commented Apr 21, 2016

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 👎

@javiereguiluz
Copy link
Member Author

I'm closing this because as @wouterj showed, this would be a duplicated documentation.

@xabbuh
Copy link
Member
xabbuh commented Apr 21, 2016

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.

@javiereguiluz
Copy link
Member Author

@xabbuh done in #6506.

wouterj added a commit that referenced this pull request May 5, 2016
…eguiluz)

This PR was squashed before being merged into the 2.3 branch (closes #6506).

Discussion
----------

Added a tip about routes and container parameters

This replaces #6505.

Commits
-------

ae0f2c9 Added a tip about routes and container parameters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0