{"action":"created","comment":{"url":"https://api.github.com/repos/symfony/symfony/pulls/comments/75825216","id":75825216,"diff_hunk":"@@ -66,6 +66,7 @@ class Container implements ResettableContainerInterface\n     protected $services = array();\n     protected $methodMap = array();\n     protected $privates = array();\n+    protected $synthetics = array();","path":"src/Symfony/Component/DependencyInjection/Container.php","position":4,"original_position":4,"commit_id":"2da7f81d01b793a5fdc23f9d2d94ab4cb49e2fa1","original_commit_id":"2da7f81d01b793a5fdc23f9d2d94ab4cb49e2fa1","user":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars.githubusercontent.com/u/243674?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolas-grekas","html_url":"https://github.com/nicolas-grekas","followers_url":"https://api.github.com/users/nicolas-grekas/followers","following_url":"https://api.github.com/users/nicolas-grekas/following{/other_user}","gists_url":"https://api.github.com/users/nicolas-grekas/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolas-grekas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolas-grekas/subscriptions","organizations_url":"https://api.github.com/users/nicolas-grekas/orgs","repos_url":"https://api.github.com/users/nicolas-grekas/repos","events_url":"https://api.github.com/users/nicolas-grekas/events{/privacy}","received_events_url":"https://api.github.com/users/nicolas-grekas/received_events","type":"User","site_admin":false},"body":"Method for synthetic services throw exceptions, which means they are functionally useless. So for me it's safe to remove them from methodMap yes.","created_at":"2016-08-23T08:51:22Z","updated_at":"2016-08-23T08:51:22Z","html_url":"https://github.com/symfony/symfony/pull/19668#discussion_r75825216","pull_request_url":"https://api.github.com/repos/symfony/symfony/pulls/19668","_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments/75825216"},"html":{"href":"https://github.com/symfony/symfony/pull/19668#discussion_r75825216"},"pull_request":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19668"}}},"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/19668","id":81946356,"html_url":"https://github.com/symfony/symfony/pull/19668","diff_url":"https://github.com/symfony/symfony/pull/19668.diff","patch_url":"https://github.com/symfony/symfony/pull/19668.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/19668","number":19668,"state":"open","locked":false,"title":"[DI] Deprecate Container::set for nulls and existing services","user":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars.githubusercontent.com/u/1047696?v=3","gravatar_id":"","url":"https://api.github.com/users/ro0NL","html_url":"https://github.com/ro0NL","followers_url":"https://api.github.com/users/ro0NL/followers","following_url":"https://api.github.com/users/ro0NL/following{/other_user}","gists_url":"https://api.github.com/users/ro0NL/gists{/gist_id}","starred_url":"https://api.github.com/users/ro0NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro0NL/subscriptions","organizations_url":"https://api.github.com/users/ro0NL/orgs","repos_url":"https://api.github.com/users/ro0NL/repos","events_url":"https://api.github.com/users/ro0NL/events{/privacy}","received_events_url":"https://api.github.com/users/ro0NL/received_events","type":"User","site_admin":false},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | \"master\"\r\n| Bug fix?      | no\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | yes\r\n| Tests pass?   | yes\r\n| Fixed tickets | #19192\r\n| License       | MIT\r\n| Doc PR        | reference to the documentation PR, if any\r\n\r\nNot sure what i got myself into, it's a true adventure so far. But this deprecates\r\n`Container::set('id', null)` :scream: and `Container::set('id', $previousSetService)`\r\n\r\n- We violate the [contract](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/ContainerInterface.php#L34), which we are also fixing at the same time: #19203 \r\n- We can consider `ContainerInterface::remove` if we need to support it (so far im not sure really)\r\n- This relates to the `ContainerBuilder` #19644 + #19619, but maybe we can do it in little steps on master\r\n- This relates to #19673 in terms of making the DIC more logical/maintainable.\r\n\r\nBefore/After:\r\n- `set('id', null)`\r\n - Resets the service, but is deprecated as of 3.2\r\n - In 4.0 we can remove the case (expecting it to be an object as documented) or throw. This is yet to be decided.\r\n- `set('id', $instance)`\r\n - Allowed if, and only if the service is not declared previously. This is recommended by design, and keeps the dependency graph trusty. Breaking this rule is deprecated as of 3.2.\r\n - In 4.0 this should throw an exception.\r\n\r\nMoving forward;\r\n- Again this is also about making things logical/maintainable, please consider :-)\r\n- Next step could be the `ContainerBuilder` to be clear on synthetcs/definitions vs. pre/post compilation.\r\n- ~~Currently there are still some `array_key_exists` calls, where `isset` will cover by design. I havent fully found out why (maybe im stilling missing a big thing), but if we move from protected to private we can guarantee `isset` works.~~","created_at":"2016-08-19T08:47:59Z","updated_at":"2016-08-23T08:51:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0696829a9abb58a58e2d46a3e3b913296ec3bef","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/19668/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/19668/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/19668/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/2da7f81d01b793a5fdc23f9d2d94ab4cb49e2fa1","head":{"label":"ro0NL:di/container-set","ref":"di/container-set","sha":"2da7f81d01b793a5fdc23f9d2d94ab4cb49e2fa1","user":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars.githubusercontent.com/u/1047696?v=3","gravatar_id":"","url":"https://api.github.com/users/ro0NL","html_url":"https://github.com/ro0NL","followers_url":"https://api.github.com/users/ro0NL/followers","following_url":"https://api.github.com/users/ro0NL/following{/other_user}","gists_url":"https://api.github.com/users/ro0NL/gists{/gist_id}","starred_url":"https://api.github.com/users/ro0NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro0NL/subscriptions","organizations_url":"https://api.github.com/users/ro0NL/orgs","repos_url":"https://api.github.com/users/ro0NL/repos","events_url":"https://api.github.com/users/ro0NL/events{/privacy}","received_events_url":"https://api.github.com/users/ro0NL/received_events","type":"User","site_admin":false},"repo":{"id":57444546,"name":"symfony","full_name":"ro0NL/symfony","owner":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars.githubusercontent.com/u/1047696?v=3","gravatar_id":"","url":"https://api.github.com/users/ro0NL","html_url":"https://github.com/ro0NL","followers_url":"https://api.github.com/users/ro0NL/followers","following_url":"https://api.github.com/users/ro0NL/following{/other_user}","gists_url":"https://api.github.com/users/ro0NL/gists{/gist_id}","starred_url":"https://api.github.com/users/ro0NL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ro0NL/subscriptions","organizations_url":"https://api.github.com/users/ro0NL/orgs","repos_url":"https://api.github.com/users/ro0NL/repos","events_url":"https://api.github.com/users/ro0NL/events{/privacy}","received_events_url":"https://api.github.com/users/ro0NL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ro0NL/symfony","description":"The Symfony PHP framework","fork":true,"url":"https://api.github.com/repos/ro0NL/symfony","forks_url":"https://api.github.com/repos/ro0NL/symfony/forks","keys_url":"https://api.github.com/repos/ro0NL/symfony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ro0NL/symfony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ro0NL/symfony/teams","hooks_url":"https://api.github.com/repos/ro0NL/symfony/hooks","issue_events_url":"https://api.github.com/repos/ro0NL/symfony/issues/events{/number}","events_url":"https://api.github.com/repos/ro0NL/symfony/events","assignees_url":"https://api.github.com/repos/ro0NL/symfony/assignees{/user}","branches_url":"https://api.github.com/repos/ro0NL/symfony/branches{/branch}","tags_url":"https://api.github.com/repos/ro0NL/symfony/tags","blobs_url":"https://api.github.com/repos/ro0NL/symfony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ro0NL/symfony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ro0NL/symfony/git/refs{/sha}","trees_url":"https://api.github.com/repos/ro0NL/symfony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ro0NL/symfony/statuses/{sha}","languages_url":"https://api.github.com/repos/ro0NL/symfony/languages","stargazers_url":"https://api.github.com/repos/ro0NL/symfony/stargazers","contributors_url":"https://api.github.com/repos/ro0NL/symfony/contributors","subscribers_url":"https://api.github.com/repos/ro0NL/symfony/subscribers","subscription_url":"https://api.github.com/repos/ro0NL/symfony/subscription","commits_url":"https://api.github.com/repos/ro0NL/symfony/commits{/sha}","git_commits_url":"https://api.github.com/repos/ro0NL/symfony/git/commits{/sha}","comments_url":"https://api.github.com/repos/ro0NL/symfony/comments{/number}","issue_comment_url":"https://api.github.com/repos/ro0NL/symfony/issues/comments{/number}","contents_url":"https://api.github.com/repos/ro0NL/symfony/contents/{+path}","compare_url":"https://api.github.com/repos/ro0NL/symfony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ro0NL/symfony/merges","archive_url":"https://api.github.com/repos/ro0NL/symfony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ro0NL/symfony/downloads","issues_url":"https://api.github.com/repos/ro0NL/symfony/issues{/number}","pulls_url":"https://api.github.com/repos/ro0NL/symfony/pulls{/number}","milestones_url":"https://api.github.com/repos/ro0NL/symfony/milestones{/number}","notifications_url":"https://api.github.com/repos/ro0NL/symfony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ro0NL/symfony/labels{/name}","releases_url":"https://api.github.com/repos/ro0NL/symfony/releases{/id}","deployments_url":"https://api.github.com/repos/ro0NL/symfony/deployments","created_at":"2016-04-30T14:01:29Z","updated_at":"2016-04-30T14:03:02Z","pushed_at":"2016-08-23T08:05:42Z","git_url":"git://github.com/ro0NL/symfony.git","ssh_url":"git@github.com:ro0NL/symfony.git","clone_url":"https://github.com/ro0NL/symfony.git","svn_url":"https://github.com/ro0NL/symfony","homepage":"symfony.dev","size":71590,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"symfony:master","ref":"master","sha":"5603bffdd9841e3542d645e1fe55c69b6b311a78","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}","deployments_url":"https://api.github.com/repos/symfony/symfony/deployments","created_at":"2010-01-04T14:21:21Z","updated_at":"2016-08-23T08:01:48Z","pushed_at":"2016-08-23T08:36:28Z","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":134526,"stargazers_count":12815,"watchers_count":12815,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":4992,"mirror_url":null,"open_issues_count":758,"forks":4992,"open_issues":758,"watchers":12815,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19668"},"html":{"href":"https://github.com/symfony/symfony/pull/19668"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/19668"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/19668/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19668/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19668/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/2da7f81d01b793a5fdc23f9d2d94ab4cb49e2fa1"}}}}
{"actor":{"display_login":"nicolas-grekas"}}