{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/21953","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/21953/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/21953/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/21953/events","html_url":"https://github.com/symfony/symfony/pull/21953","id":213136791,"number":21953,"title":"[Console] Fix BC break regarding console.command event","user":{"login":"chalasr","id":7502063,"avatar_url":"https://avatars3.githubusercontent.com/u/7502063?v=3","gravatar_id":"","url":"https://api.github.com/users/chalasr","html_url":"https://github.com/chalasr","followers_url":"https://api.github.com/users/chalasr/followers","following_url":"https://api.github.com/users/chalasr/following{/other_user}","gists_url":"https://api.github.com/users/chalasr/gists{/gist_id}","starred_url":"https://api.github.com/users/chalasr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalasr/subscriptions","organizations_url":"https://api.github.com/users/chalasr/orgs","repos_url":"https://api.github.com/users/chalasr/repos","events_url":"https://api.github.com/users/chalasr/events{/privacy}","received_events_url":"https://api.github.com/users/chalasr/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":125388,"url":"https://api.github.com/repos/symfony/symfony/labels/Console","name":"Console","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":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/symfony/symfony/milestones/14","html_url":"https://github.com/symfony/symfony/milestone/14","labels_url":"https://api.github.com/repos/symfony/symfony/milestones/14/labels","id":2178740,"number":14,"title":"2.8","description":"https://symfony.com/roadmap?version=2.8#checker","creator":{"login":"nicolas-grekas","id":243674,"avatar_url":"https://avatars0.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},"open_issues":4,"closed_issues":17,"state":"open","created_at":"2016-12-06T12:03:12Z","updated_at":"2017-03-10T09:50:42Z","due_on":"2018-11-30T08:00:00Z","closed_at":null},"comments":4,"created_at":"2017-03-09T19:17:21Z","updated_at":"2017-03-10T14:19:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/symfony/symfony/pulls/21953","html_url":"https://github.com/symfony/symfony/pull/21953","diff_url":"https://github.com/symfony/symfony/pull/21953.diff","patch_url":"https://github.com/symfony/symfony/pull/21953.patch"},"body":"| Q             | A\r\n| ------------- | ---\r\n| Branch?       | 2.8\r\n| Bug fix?      | yes\r\n| New feature?  | no\r\n| BC breaks?    | no\r\n| Deprecations? | no\r\n| Tests pass?   | yes\r\n| Fixed tickets | https://github.com/symfony/symfony/pull/21841#issuecomment-285304967\r\n| License       | MIT\r\n| Doc PR        | n/a\r\n"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/285680037","html_url":"https://github.com/symfony/symfony/pull/21953#issuecomment-285680037","issue_url":"https://api.github.com/repos/symfony/symfony/issues/21953","id":285680037,"user":{"login":"pierre-tranchard","id":1912299,"avatar_url":"https://avatars0.githubusercontent.com/u/1912299?v=3","gravatar_id":"","url":"https://api.github.com/users/pierre-tranchard","html_url":"https://github.com/pierre-tranchard","followers_url":"https://api.github.com/users/pierre-tranchard/followers","following_url":"https://api.github.com/users/pierre-tranchard/following{/other_user}","gists_url":"https://api.github.com/users/pierre-tranchard/gists{/gist_id}","starred_url":"https://api.github.com/users/pierre-tranchard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierre-tranchard/subscriptions","organizations_url":"https://api.github.com/users/pierre-tranchard/orgs","repos_url":"https://api.github.com/users/pierre-tranchard/repos","events_url":"https://api.github.com/users/pierre-tranchard/events{/privacy}","received_events_url":"https://api.github.com/users/pierre-tranchard/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T14:19:25Z","updated_at":"2017-03-10T14:19:25Z","body":"Yes I removed the manual binding.\r\n\r\nhere's my delegated input class\r\n```\r\nclass DelegatedInput extends ArrayInput\r\n{\r\n\r\n    /**\r\n     * DelegateInput constructor.\r\n     *\r\n     * @param InputInterface  $source\r\n     * @param InputDefinition $definition\r\n     * @param array           $ignoredAttrs\r\n     * @param array           $ignoredOpts\r\n     */\r\n    public function __construct(\r\n        InputInterface $source,\r\n        InputDefinition $definition,\r\n        $ignoredAttrs = [],\r\n        $ignoredOpts = []\r\n    ) {\r\n        $source->bind($definition);\r\n        $this->definition = $definition;\r\n\r\n        foreach ($source->getArguments() as $name => $value) {\r\n            if (!in_array($name, $ignoredAttrs)) {\r\n                $this->setArgument($name, $value);\r\n            }\r\n        }\r\n        foreach ($source->getOptions() as $name => $value) {\r\n            if (!in_array($name, $ignoredOpts)) {\r\n                $this->setOption($name, $value);\r\n            }\r\n        }\r\n        parent::__construct([]);\r\n    }\r\n\r\n    /**\r\n     * @return string\r\n     */\r\n    public function __toString()\r\n    {\r\n        $pattern = implode(' ', $this->getArguments());\r\n        if (!empty($pattern)) {\r\n            $pattern = sprintf(\" %s\", $pattern);\r\n        }\r\n        foreach ($this->getOptions() as $option => $value) {\r\n            if (is_string($value)) {\r\n                $pattern .= sprintf(\" --%s=%s\", $option, $value);\r\n            } elseif (is_bool($value) && $value) {\r\n                $pattern .= sprintf(\" --%s\", $option);\r\n            }\r\n        }\r\n\r\n        return $pattern;\r\n    }\r\n}\r\n```\r\n\r\nWhen my supervisor command calls the supervised command, a delegated input instance is created and passed to the supervised command.\r\nIf i remove the bind instruction, I don't have the options and arguments from the supervisor command (exception the command argument)"}}
{"actor":{"display_login":"pierre-tranchard"}}