Skip to content
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

[FrameworkBundle] Forbid env parameters in routing configuration #20687

Merged
merged 1 commit into from Nov 30, 2016

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 3.2
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #20682
License MIT
Doc PR -

@fabpot
Copy link
Member

fabpot commented Nov 30, 2016

Thank you @nicolas-grekas.

@fabpot fabpot merged commit a931002 into symfony:3.2 Nov 30, 2016
fabpot added a commit that referenced this pull request Nov 30, 2016
…ration (nicolas-grekas)

This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Forbid env parameters in routing configuration

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |  #20682
| License       | MIT
| Doc PR        | -

Commits
-------

a931002 [FrameworkBundle] Forbid env parameters in routing configuration
@fabpot fabpot mentioned this pull request Nov 30, 2016
@nicolas-grekas nicolas-grekas deleted the route-warmup-no-env branch December 9, 2016 10:57
@n-sviridenko
Copy link

Hello! My routing definitions are dependent on host. Host is environment-dependent variable:

routing_api:
    resource: routing_api.yml
    prefix: /
    condition: "request.server.get('HTTP_HOST') === '%env(API_HOST)%'"

The application is running inside a container so It should stay environment dependent, otherwise the api host will be stored in the cache and the API_HOST environment variable will be ignored that's bad. Is there any workaround?

@n-sviridenko
Copy link

n-sviridenko commented Jan 1, 2018

The easiest way I found is to warmup the cache every time by doing this in the docker ENTRYPOINT script:

rm -rf var/cache/*
php bin/console cache:warmup --env=$SYMFONY_ENV
chown -R www-data var/cache

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.

None yet

4 participants