{"action":"closed","number":10138,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/10138","id":11877202,"html_url":"https://github.com/symfony/symfony/pull/10138","diff_url":"https://github.com/symfony/symfony/pull/10138.diff","patch_url":"https://github.com/symfony/symfony/pull/10138.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/10138","number":10138,"state":"closed","locked":false,"title":"[WIP][DependencyInjection] Issue #7555 - Resolve environment variables at runtime","user":{"login":"lavoiesl","id":1216046,"avatar_url":"https://avatars.githubusercontent.com/u/1216046?v=3","gravatar_id":"","url":"https://api.github.com/users/lavoiesl","html_url":"https://github.com/lavoiesl","followers_url":"https://api.github.com/users/lavoiesl/followers","following_url":"https://api.github.com/users/lavoiesl/following{/other_user}","gists_url":"https://api.github.com/users/lavoiesl/gists{/gist_id}","starred_url":"https://api.github.com/users/lavoiesl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavoiesl/subscriptions","organizations_url":"https://api.github.com/users/lavoiesl/orgs","repos_url":"https://api.github.com/users/lavoiesl/repos","events_url":"https://api.github.com/users/lavoiesl/events{/privacy}","received_events_url":"https://api.github.com/users/lavoiesl/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Bug fix?      | no\r\n| New feature?  | yes\r\n| BC breaks?    | minimal\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | #7555\r\n| License       | MIT\r\n| Doc PR        | TODO\r\n\r\n- [x] basic tests\r\n- [ ] performance tests\r\n- [ ] Deep tests\r\n- [ ] documentation\r\n\r\nThis allows to set a parameter `environment_map` that contains a map `[$parameter => $env_var]`. This allows to call `ParameterBag::resolveEnvironmentMap` even after the bag was initially resolved and frozen. As mentioned by @stof, dependent parameter can not be resolved anymore, so it is forbidden to reference a parameter in the environment map elsewhere. However, `resolveEnvironmentMap` will use `resolveValue`, so it is possible to reference another parameter in the enviromnent variable.\r\n\r\n`HttpKernel` now calls  `ParameterBag::resolveEnvironmentMap` after the `Container` was fully loaded.\r\n\r\nI am not entirely sure of the implication of this method with the caching mechanism, the cache warmers, etc. I could use some help from someone with a better understanding of the whole thing.\r\n\r\nThe only BC break is that `environment_map` is not a valid parameter name anymore, it is reserved. ","created_at":"2014-01-25T21:25:38Z","updated_at":"2015-11-12T06:41:32Z","closed_at":"2015-11-12T06:41:32Z","merged_at":null,"merge_commit_sha":"c71c513b2a7515ecf0545b89f12fe4eb39f97638","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/10138/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/10138/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/10138/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/c66ebc70c609292d00b8e552f395490b80be2954","head":{"label":"lavoiesl:issue-7555-env-vars","ref":"issue-7555-env-vars","sha":"c66ebc70c609292d00b8e552f395490b80be2954","user":{"login":"lavoiesl","id":1216046,"avatar_url":"https://avatars.githubusercontent.com/u/1216046?v=3","gravatar_id":"","url":"https://api.github.com/users/lavoiesl","html_url":"https://github.com/lavoiesl","followers_url":"https://api.github.com/users/lavoiesl/followers","following_url":"https://api.github.com/users/lavoiesl/following{/other_user}","gists_url":"https://api.github.com/users/lavoiesl/gists{/gist_id}","starred_url":"https://api.github.com/users/lavoiesl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavoiesl/subscriptions","organizations_url":"https://api.github.com/users/lavoiesl/orgs","repos_url":"https://api.github.com/users/lavoiesl/repos","events_url":"https://api.github.com/users/lavoiesl/events{/privacy}","received_events_url":"https://api.github.com/users/lavoiesl/received_events","type":"User","site_admin":false},"repo":{"id":4593430,"name":"symfony","full_name":"lavoiesl/symfony","owner":{"login":"lavoiesl","id":1216046,"avatar_url":"https://avatars.githubusercontent.com/u/1216046?v=3","gravatar_id":"","url":"https://api.github.com/users/lavoiesl","html_url":"https://github.com/lavoiesl","followers_url":"https://api.github.com/users/lavoiesl/followers","following_url":"https://api.github.com/users/lavoiesl/following{/other_user}","gists_url":"https://api.github.com/users/lavoiesl/gists{/gist_id}","starred_url":"https://api.github.com/users/lavoiesl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavoiesl/subscriptions","organizations_url":"https://api.github.com/users/lavoiesl/orgs","repos_url":"https://api.github.com/users/lavoiesl/repos","events_url":"https://api.github.com/users/lavoiesl/events{/privacy}","received_events_url":"https://api.github.com/users/lavoiesl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lavoiesl/symfony","description":"The Symfony2 PHP framework","fork":true,"url":"https://api.github.com/repos/lavoiesl/symfony","forks_url":"https://api.github.com/repos/lavoiesl/symfony/forks","keys_url":"https://api.github.com/repos/lavoiesl/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lavoiesl/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lavoiesl/symfony/teams","hooks_url":"https://api.github.com/repos/lavoiesl/symfony/hooks","issue_events_url":"https://api.github.com/repos/lavoiesl/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/lavoiesl/symfony/events","assignees_url":"https://api.github.com/repos/lavoiesl/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/lavoiesl/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/lavoiesl/symfony/tags","blobs_url":"https://api.github.com/repos/lavoiesl/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lavoiesl/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lavoiesl/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/lavoiesl/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lavoiesl/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/lavoiesl/symfony/languages","stargazers_url":"https://api.github.com/repos/lavoiesl/symfony/stargazers","contributors_url":"https://api.github.com/repos/lavoiesl/symfony/contributors","subscribers_url":"https://api.github.com/repos/lavoiesl/symfony/subscribers","subscription_url":"https://api.github.com/repos/lavoiesl/symfony/subscription","commits_url":"https://api.github.com/repos/lavoiesl/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/lavoiesl/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/lavoiesl/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/lavoiesl/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/lavoiesl/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/lavoiesl/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lavoiesl/symfony/merges","archive_url":"https://api.github.com/repos/lavoiesl/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lavoiesl/symfony/downloads","issues_url":"https://api.github.com/repos/lavoiesl/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/lavoiesl/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/lavoiesl/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/lavoiesl/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lavoiesl/symfony/labels{/name}","releases_url":"https://api.github.com/repos/lavoiesl/symfony/releases{/id}","created_at":"2012-06-08T04:03:48Z","updated_at":"2014-06-10T17:36:37Z","pushed_at":"2015-02-09T16:18:55Z","git_url":"git://github.com/lavoiesl/symfony.git","ssh_url":"git@github.com:lavoiesl/symfony.git","clone_url":"https://github.com/lavoiesl/symfony.git","svn_url":"https://github.com/lavoiesl/symfony","homepage":"symfony.com","size":51700,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"symfony:master","ref":"master","sha":"312dbedf9d34825bbc5d3fa9ed7bea8c06e19afe","user":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"repo":{"id":458058,"name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"avatar_url":"https://avatars.githubusercontent.com/u/143937?v=3","gravatar_id":"","url":"https://api.github.com/users/symfony","html_url":"https://github.com/symfony","followers_url":"https://api.github.com/users/symfony/followers","following_url":"https://api.github.com/users/symfony/following{/other_user}","gists_url":"https://api.github.com/users/symfony/gists{/gist_id}","starred_url":"https://api.github.com/users/symfony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/symfony/subscriptions","organizations_url":"https://api.github.com/users/symfony/orgs","repos_url":"https://api.github.com/users/symfony/repos","events_url":"https://api.github.com/users/symfony/events{/privacy}","received_events_url":"https://api.github.com/users/symfony/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/symfony/symfony","description":"The Symfony PHP framework","fork":false,"url":"https://api.github.com/repos/symfony/symfony","forks_url":"https://api.github.com/repos/symfony/symfony/forks","keys_url":"https://api.github.com/repos/symfony/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/symfony/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/symfony/symfony/teams","hooks_url":"https://api.github.com/repos/symfony/symfony/hooks","issue_events_url":"https://api.github.com/repos/symfony/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/symfony/symfony/events","assignees_url":"https://api.github.com/repos/symfony/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/symfony/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/symfony/symfony/tags","blobs_url":"https://api.github.com/repos/symfony/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/symfony/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/symfony/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/symfony/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/symfony/symfony/languages","stargazers_url":"https://api.github.com/repos/symfony/symfony/stargazers","contributors_url":"https://api.github.com/repos/symfony/symfony/contributors","subscribers_url":"https://api.github.com/repos/symfony/symfony/subscribers","subscription_url":"https://api.github.com/repos/symfony/symfony/subscription","commits_url":"https://api.github.com/repos/symfony/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/symfony/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/symfony/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/symfony/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/symfony/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/symfony/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/symfony/symfony/merges","archive_url":"https://api.github.com/repos/symfony/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/symfony/symfony/downloads","issues_url":"https://api.github.com/repos/symfony/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/symfony/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/symfony/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/symfony/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/symfony/symfony/labels{/name}","releases_url":"https://api.github.com/repos/symfony/symfony/releases{/id}","created_at":"2010-01-04T14:21:21Z","updated_at":"2015-11-12T03:38:07Z","pushed_at":"2015-11-12T05:45:02Z","git_url":"git://github.com/symfony/symfony.git","ssh_url":"git@github.com:symfony/symfony.git","clone_url":"https://github.com/symfony/symfony.git","svn_url":"https://github.com/symfony/symfony","homepage":"symfony.com","size":261998,"stargazers_count":11119,"watchers_count":11119,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4371,"mirror_url":null,"open_issues_count":800,"forks":4371,"open_issues":800,"watchers":11119,"default_branch":"2.8"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/10138"},"html":{"href":"https://github.com/symfony/symfony/pull/10138"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/10138"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/10138/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/10138/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/10138/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/c66ebc70c609292d00b8e552f395490b80be2954"}},"merged":false,"mergeable":false,"mergeable_state":"dirty","merged_by":null,"comments":4,"review_comments":2,"commits":1,"additions":77,"deletions":1,"changed_files":4}}