{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/22903","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/22903/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/22903/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/22903/events","html_url":"https://github.com/symfony/symfony/pull/22903","id":231257030,"number":22903,"title":"[DI] Deprecate XML services without ID","user":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars3.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},"labels":[{"id":99863,"url":"https://api.github.com/repos/symfony/symfony/labels/DependencyInjection","name":"DependencyInjection","color":"DDDDDD","default":false},{"id":337186922,"url":"https://api.github.com/repos/symfony/symfony/labels/Deprecation","name":"Deprecation","color":"f1c40f","default":false},{"id":100378,"url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","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":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/10","html_url":"https://github.com/symfony/symfony/milestone/10","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/10/labels","id":2117464,"number":10,"title":"3.4","description":"https://symfony.com/roadmap?version=3.4#checker","creator":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars0.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"open_issues":150,"closed_issues":35,"state":"open","created_at":"2016-11-06T20:24:23Z","updated_at":"2017-05-25T07:02:50Z","due_on":"2017-11-30T08:00:00Z","closed_at":null},"comments":4,"created_at":"2017-05-25T06:57:27Z","updated_at":"2017-05-25T08:51:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/22903","html_url":"https://github.com/symfony/symfony/pull/22903","diff_url":"https://github.com/symfony/symfony/pull/22903.diff","patch_url":"https://github.com/symfony/symfony/pull/22903.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | 3.4\r\n| Bug fix?      | no, confusing though\r\n| New feature?  | yes\r\n| BC breaks?    | no\r\n| Deprecations? | yes\r\n| Tests pass?   | yes\r\n| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->\r\n| License       | MIT\r\n| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->\r\n\r\nOn slack someone had a issue with class named services;\r\n\r\n> So, probably should have done this sooner, I stepped through with a debugger and it looks like \\Symfony\\Component\\DependencyInjection\\Loader\\XmlFileLoader::processAnonymousServices assigns a sha256 to services that don't have any IDs\r\n> When my manually wired service is registered, it has an ID that looks like 1_344b468f6069ffe8c32092409d99c59abc218f41071ce4c4230c198876129bc0, so it doesn't override the auto-loaded one\r\n> I swear I read that IDs default to the class name now...\r\n\r\nThe fix was easy; doing `<service id=\"ClassName\"/>` instead of `<service class=\"ClassName\"/>`. However the thing is... i made the exact same mistake trying to reproduce :sweat_smile: \r\n\r\nI think given the recent developments (dropping type based autowiring and class named services) it makes sense to force XML service to specify an ID attribute (the top level ones). This would be consistent with YAML and PHP as well.\r\n\r\nFixing deprecations is also easy, just change `class` attribute to `id` like i've done for the frameworkbundle in this PR.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/303958335","html_url":"https://github.com/symfony/symfony/pull/22903#issuecomment-303958335","issue_url":"https://api.github.com/repos/symfony/symfony/issues/22903","id":303958335,"user":{"login":"ro0NL","id":1047696,"avatar_url":"https://avatars3.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},"created_at":"2017-05-25T08:51:03Z","updated_at":"2017-05-25T08:51:03Z","body":"@xabbuh extra test added"}}
{"actor":{"display_login":"ro0NL"}}