{"action":"closed","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/23140","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/23140/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/23140/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/23140/events","html_url":"https://github.com/symfony/symfony/issues/23140","id":235158564,"number":23140,"title":"[Routing] Dumper use compile time values for runtime defined parameters ('%env(VAL)%')","user":{"login":"VolCh","id":396345,"avatar_url":"https://avatars3.githubusercontent.com/u/396345?v=4","gravatar_id":"","url":"https://api.github.com/users/VolCh","html_url":"https://github.com/VolCh","followers_url":"https://api.github.com/users/VolCh/followers","following_url":"https://api.github.com/users/VolCh/following{/other_user}","gists_url":"https://api.github.com/users/VolCh/gists{/gist_id}","starred_url":"https://api.github.com/users/VolCh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VolCh/subscriptions","organizations_url":"https://api.github.com/users/VolCh/orgs","repos_url":"https://api.github.com/users/VolCh/repos","events_url":"https://api.github.com/users/VolCh/events{/privacy}","received_events_url":"https://api.github.com/users/VolCh/received_events","type":"User","site_admin":false},"labels":[{"id":100079,"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":111254,"url":"https://api.github.com/repos/symfony/symfony/labels/Routing","name":"Routing","color":"DDDDDD","default":false},{"id":237003792,"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-06-12T08:31:34Z","updated_at":"2018-03-13T12:53:12Z","closed_at":"2018-03-13T12:53:12Z","author_association":"CONTRIBUTOR","body":"| Q                | A\r\n| ---------------- | -----\r\n| Bug report?      | yes\r\n| Feature request? | no\r\n| BC Break report? | no\r\n| RFC?             | no\r\n| Symfony version  | 3.2.0+\r\n\r\nWith config\r\n```yaml\r\nparameters:\r\n    domain: '%env(DOMAIN)%'\r\n    env(DOMAIN): localhost\r\n```\r\nand route \r\n```php\r\n    /**\r\n     * @Route(\r\n     *     \"/\",\r\n     *     name=\"mobile_homepage\",\r\n     *     host=\"m.{domain}\",\r\n     *     defaults={\"domain\"=\"%domain%\"},\r\n     *     requirements={\"domain\"=\"%domain%\"}\r\n     * )\r\n     */\r\n    public function mobileHomepageAction()\r\n    {\r\n        // ...\r\n    }\r\n```\r\nRouter dump the  value of DOMAIN environment variable ( ('localhost' if undefined) of dump process (console cache:warmup) instead of use container getParameter (which use getenv('DOMAIN')) in runtime.\r\n\r\nI think this is unexpected behavior according http://symfony.com/doc/current/configuration/external_parameters.html :\r\n> You can reference environment variables by using special parameters named after the variables you want to use enclosed between env(). Their actual values will be resolved at runtime (once per request), so that dumped containers can be reconfigured dynamically even after being compiled.\r\n\r\nI'll try to create fix PR if this bug report is confirmed.\r\n\r\n\r\n"}}
{"actor":{"display_login":"nicolas-grekas"}}