8000 [Routing][FrameworkBundle] Allow using env() in route conditions · Issue #13247 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Routing][FrameworkBundle] Allow using env() in route conditions #13247

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
fabpot opened this issue Feb 25, 2020 · 4 comments · Fixed by #16610
Closed

[Routing][FrameworkBundle] Allow using env() in route conditions #13247

fabpot opened this issue Feb 25, 2020 · 4 comments · Fixed by #16610

Comments

@fabpot
Copy link
Member
fabpot commented Feb 25, 2020
Q A
Feature PR symfony/symfony#35747
PR author(s) @atailouloute
Merged in 5.1-dev
@xabbuh xabbuh added the Routing label Feb 27, 2020
@xabbuh xabbuh added this to the 5.1 milestone Feb 27, 2020
@nicolas-grekas
Copy link
Member

This PR also introduces the routing.expression_language_function tag, which is a new capability on its own.

@carsonbot
Copy link
Collaborator

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

@carsonbot
Copy link
Collaborator

Could I get an answer? If I do not hear anything I will assume this issue is resolved or abandoned. Please get back to me <3

@carsonbot
Copy link
Collaborator

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

javiereguiluz added a commit that referenced this issue Mar 25, 2022
…mNaN)

This PR was merged into the 5.4 branch.

Discussion
----------

[Routing] doc for env() function in route condition

Fix #13247 for symfony/symfony#35747

Very useful to match host based on env var.

```yaml
blog_list:
    path: /blog
    # the controller value has the format 'controller_class::method_name'
    controller: App\Controller\BlogController::list
    condition: "context.getHost() == env('APP_MAIN_HOST')"
```

Commits
-------

c22dc20 Documentation for env() function in route condition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0