{"action":"closed","number":19249,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/19249","id":75837931,"node_id":"MDExOlB1bGxSZXF1ZXN0NzU4Mzc5MzE=","html_url":"https://github.com/symfony/symfony/pull/19249","diff_url":"https://github.com/symfony/symfony/pull/19249.diff","patch_url":"https://github.com/symfony/symfony/pull/19249.patch","issue_url":"https://api.github.com/repos/symfony/symfony/issues/19249","number":19249,"state":"closed","locked":false,"title":"[FrameworkBundle] Output where a service is injected during debug","user":{"login":"jjanvier","id":3691804,"node_id":"MDQ6VXNlcjM2OTE4MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3691804?v=4","gravatar_id":"","url":"https://api.github.com/users/jjanvier","html_url":"https://github.com/jjanvier","followers_url":"https://api.github.com/users/jjanvier/followers","following_url":"https://api.github.com/users/jjanvier/following{/other_user}","gists_url":"https://api.github.com/users/jjanvier/gists{/gist_id}","starred_url":"https://api.github.com/users/jjanvier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjanvier/subscriptions","organizations_url":"https://api.github.com/users/jjanvier/orgs","repos_url":"https://api.github.com/users/jjanvier/repos","events_url":"https://api.github.com/users/jjanvier/events{/privacy}","received_events_url":"https://api.github.com/users/jjanvier/received_events","type":"User","site_admin":false},"body":"## Todo\r\n\r\n- [x] JSON\r\n- [x] TXT\r\n- [x] MD\r\n- [X] XML\r\n- [x] skip current definition\r\n- [x] ask if output's definition needs the usages\r\n\r\n## Goal\r\n\r\nThe goal of this PR is to be able to know where a service is injected when using `bin/console debug:container service_name`.\r\n\r\nImagine the following services:\r\n\r\n```\r\nservices:\r\n    bar:\r\n        class: StdClass\r\n        tags:\r\n            - { name: 'tag1' }\r\n    foo_constructor:\r\n        class: StdClass\r\n        arguments:\r\n            - '@bar'\r\n    foo_setter:\r\n        class: FooSetter\r\n        calls:\r\n            - [setBar, ['@bar']]\r\n    foo_property:\r\n        class: FooProperty\r\n        properties:\r\n            bar: '@bar'\r\n```\r\n\r\nThe command `bin/console debug:container bar` will output:\r\n![sf1](https://cloud.githubusercontent.com/assets/3691804/21174371/0bdaabc8-c1dd-11e6-8d8c-c1656ec6bfa1.png)\r\n\r\nThe command `bin/console debug:container foo_constructor` will output:\r\n![sf2](https://cloud.githubusercontent.com/assets/3691804/21174385/20a4cf20-c1dd-11e6-94ba-ef4cc685eed8.png)\r\n\r\n| 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? | no |\r\n| Tests pass? | almost... |\r\n| Fixed tickets | - |\r\n| License | MIT |\r\n| Doc PR | - |\r\n","created_at":"2016-06-30T15:15:06Z","updated_at":"2018-06-07T22:55:55Z","closed_at":"2018-06-07T22:55:55Z","merged_at":null,"merge_commit_sha":"edc08f336ee770d8cd196f016a9c4b5ddfd7f7ea","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":100378,"node_id":"MDU6TGFiZWwxMDAzNzg=","url":"https://api.github.com/repos/symfony/symfony/labels/Feature","name":"Feature","color":"02e10c","default":false},{"id":148416,"node_id":"MDU6TGFiZWwxNDg0MTY=","url":"https://api.github.com/repos/symfony/symfony/labels/FrameworkBundle","name":"FrameworkBundle","color":"DDDDDD","default":false},{"id":237003792,"node_id":"MDU6TGFiZWwyMzcwMDM3OTI=","url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false}],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/18","html_url":"https://github.com/symfony/symfony/milestone/18","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/18/labels","id":3234645,"node_id":"MDk6TWlsZXN0b25lMzIzNDY0NQ==","number":18,"title":"next","description":"https://symfony.com/roadmap?version=4.2#checker","creator":{"login":"nicolas-grekas","id":243674,"node_id":"MDQ6VXNlcjI0MzY3NA==","avatar_url":"https://avatars3.githubusercontent.com/u/243674?v=4","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},"open_issues":146,"closed_issues":33,"state":"open","created_at":"2018-04-02T12:03:21Z","updated_at":"2018-06-07T22:55:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/symfony/symfony/pulls/19249/commits","review_comments_url":"https://api.github.com/repos/symfony/symfony/pulls/19249/comments","review_comment_url":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/19249/comments","statuses_url":"https://api.github.com/repos/symfony/symfony/statuses/3ccacd698dbaae08ea786b0950287b9eed7c8796","head":{"label":"jjanvier:debug_container_injections","ref":"debug_container_injections","sha":"3ccacd698dbaae08ea786b0950287b9eed7c8796","user":{"login":"jjanvier","id":3691804,"node_id":"MDQ6VXNlcjM2OTE4MDQ=","avatar_url":"https://avatars3.githubusercontent.com/u/3691804?v=4","gravatar_id":"","url":"https://api.github.com/users/jjanvier","html_url":"https://github.com/jjanvier","followers_url":"https://api.github.com/users/jjanvier/followers","following_url":"https://api.github.com/users/jjanvier/following{/other_user}","gists_url":"https://api.github.com/users/jjanvier/gists{/gist_id}","starred_url":"https://api.github.com/users/jjanvier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjanvier/subscriptions","organizations_url":"https://api.github.com/users/jjanvier/orgs","repos_url":"https://api.github.com/users/jjanvier/repos","events_url":"https://api.github.com/users/jjanvier/events{/privacy}","received_events_url":"https://api.github.com/users/jjanvier/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"symfony:master","ref":"master","sha":"88666ddc2c07ebc83d3fdd4f5ae34adff7859093","user":{"login":"symfony","id":143937,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzkzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnk0NTgwNTg=","name":"symfony","full_name":"symfony/symfony","owner":{"login":"symfony","id":143937,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzkzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/143937?v=4","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":"2018-06-07T19:47:55Z","pushed_at":"2018-06-07T21:33:48Z","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":"https://symfony.com","size":118171,"stargazers_count":17766,"watchers_count":17766,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":6232,"mirror_url":null,"archived":false,"open_issues_count":885,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":6232,"open_issues":885,"watchers":17766,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19249"},"html":{"href":"https://github.com/symfony/symfony/pull/19249"},"issue":{"href":"https://api.github.com/repos/symfony/symfony/issues/19249"},"comments":{"href":"https://api.github.com/repos/symfony/symfony/issues/19249/comments"},"review_comments":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19249/comments"},"review_comment":{"href":"https://api.github.com/repos/symfony/symfony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/symfony/symfony/pulls/19249/commits"},"statuses":{"href":"https://api.github.com/repos/symfony/symfony/statuses/3ccacd698dbaae08ea786b0950287b9eed7c8796"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":12,"review_comments":4,"maintainer_can_modify":false,"commits":0,"additions":0,"deletions":0,"changed_files":0}}
{"actor":{"display_login":"jjanvier"}}