Skip to content

[Routing] Allow using services in the route condition #16714

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
Tobion opened this issue Apr 14, 2022 · 1 comment · Fixed by #16775
Closed

[Routing] Allow using services in the route condition #16714

Tobion opened this issue Apr 14, 2022 · 1 comment · Fixed by #16775
Labels
actionable Clear and specific issues ready for anyone to take them. Routing
Milestone

Comments

@Tobion
Copy link
Contributor

Tobion commented Apr 14, 2022

Q A
Feature PR symfony/symfony#44405
PR author(s) @renanbr
Merged in 6.1
@wouterj wouterj added this to the 6.1 milestone May 1, 2022
@wouterj
Copy link
Member

wouterj commented May 3, 2022

Hi @renanbr. This looks like a pretty big feature! Are you willing to (and do you have time) to write a bit of documentation about the feature?

I think the best would be to add the service() function to the list in https://symfony.com/doc/6.1/routing.html#matching-expressions
And then add a small section paragraph basically saying "you'll have to add the #[AsRoutingConditionService] attribute or ... tag to your service if you want to use it in the condition".

@wouterj wouterj added the actionable Clear and specific issues ready for anyone to take them. label May 3, 2022
@wouterj wouterj linked a pull request May 4, 2022 that will close this issue
javiereguiluz added a commit to javiereguiluz/symfony-docs that referenced this issue May 5, 2022
…tion (renanbr)

This PR was merged into the 6.1 branch.

Discussion
----------

[Routing] Allow using services in the route condition

Documents symfony/symfony#44405

Closes symfony#16714

Commits
-------

c2478da [Routing] Allow using services in the route condition
@wouterj wouterj closed this as completed May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. Routing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants