{"action":"opened","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/9068","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/9068/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/9068/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/9068/events","html_url":"https://github.com/magento/magento2/issues/9068","id":218413654,"number":9068,"title":"Implement static test to check for duplicate types in constructor signature.","user":{"login":"Vinai","id":72463,"avatar_url":"https://avatars3.githubusercontent.com/u/72463?v=3","gravatar_id":"","url":"https://api.github.com/users/Vinai","html_url":"https://github.com/Vinai","followers_url":"https://api.github.com/users/Vinai/followers","following_url":"https://api.github.com/users/Vinai/following{/other_user}","gists_url":"https://api.github.com/users/Vinai/gists{/gist_id}","starred_url":"https://api.github.com/users/Vinai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vinai/subscriptions","organizations_url":"https://api.github.com/users/Vinai/orgs","repos_url":"https://api.github.com/users/Vinai/repos","events_url":"https://api.github.com/users/Vinai/events{/privacy}","received_events_url":"https://api.github.com/users/Vinai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-31T06:54:04Z","updated_at":"2017-03-31T06:54:04Z","closed_at":null,"body":"This issue is based on the comment from @maghamed at https://github.com/magento/magento2/issues/6114#issuecomment-290387595\r\n\r\nTo quote:\r\n> But at the same time we agreed that it's incorrect to request multiple dependencies of the same type for one class. Like here\r\n\r\n```php\r\nclass A \r\n{\r\n    public function __construct(B $b, B $b2)\r\n    {\r\n        ...\r\n    }\r\n}\r\n```\r\nSo, this new static test has to check and prevent this situation.\r\n\r\n### Preconditions\r\nA class with a constructor duplicate object type constructor dependency \r\n\r\n### Steps to reproduce\r\nSee above.\r\n\r\n### Expected result\r\nThe static tests displays an error with a suggestion to use a Factory instead of the duplicate type dependency.\r\n"}}
{"actor":{"display_login":"Vinai"}}