{"action":"created","issue":{"url":"https://api.github.com/repos/TomBZombie/Dice/issues/47","labels_url":"https://api.github.com/repos/TomBZombie/Dice/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/TomBZombie/Dice/issues/47/comments","events_url":"https://api.github.com/repos/TomBZombie/Dice/issues/47/events","html_url":"https://github.com/TomBZombie/Dice/pull/47","id":63855315,"number":47,"title":"adding new failing tests for nested shared instances","user":{"login":"daniel-meister","id":2865015,"avatar_url":"https://avatars.githubusercontent.com/u/2865015?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-meister","html_url":"https://github.com/daniel-meister","followers_url":"https://api.github.com/users/daniel-meister/followers","following_url":"https://api.github.com/users/daniel-meister/following{/other_user}","gists_url":"https://api.github.com/users/daniel-meister/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-meister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-meister/subscriptions","organizations_url":"https://api.github.com/users/daniel-meister/orgs","repos_url":"https://api.github.com/users/daniel-meister/repos","events_url":"https://api.github.com/users/daniel-meister/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-meister/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-23T23:10:51Z","updated_at":"2015-03-24T11:50:40Z","closed_at":"2015-03-24T10:20:41Z","pull_request":{"url":"https://api.github.com/repos/TomBZombie/Dice/pulls/47","html_url":"https://github.com/TomBZombie/Dice/pull/47","diff_url":"https://github.com/TomBZombie/Dice/pull/47.diff","patch_url":"https://github.com/TomBZombie/Dice/pull/47.patch"},"body":"Unfortunately, 6eca710 does not seem to solve the problem; it's only hiding it one layer deeper; I'll start thinking about a better solution in the morning.\r\nSo far this is simply to illustrate the problem; feel free to reject this PR."},"comment":{"url":"https://api.github.com/repos/TomBZombie/Dice/issues/comments/85463889","html_url":"https://github.com/TomBZombie/Dice/pull/47#issuecomment-85463889","issue_url":"https://api.github.com/repos/TomBZombie/Dice/issues/47","id":85463889,"user":{"login":"daniel-meister","id":2865015,"avatar_url":"https://avatars.githubusercontent.com/u/2865015?v=3","gravatar_id":"","url":"https://api.github.com/users/daniel-meister","html_url":"https://github.com/daniel-meister","followers_url":"https://api.github.com/users/daniel-meister/followers","following_url":"https://api.github.com/users/daniel-meister/following{/other_user}","gists_url":"https://api.github.com/users/daniel-meister/gists{/gist_id}","starred_url":"https://api.github.com/users/daniel-meister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daniel-meister/subscriptions","organizations_url":"https://api.github.com/users/daniel-meister/orgs","repos_url":"https://api.github.com/users/daniel-meister/repos","events_url":"https://api.github.com/users/daniel-meister/events{/privacy}","received_events_url":"https://api.github.com/users/daniel-meister/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T11:50:40Z","updated_at":"2015-03-24T11:50:40Z","body":"Yes, but (at least for me) behaviour was more obvious when the args got \"consumed\" i.e. from\r\n\r\n```php\r\n\r\nclass A {\r\n    public $b;\r\n    public $str;\r\n    public function __construct(B $b, $str) {\r\n        $this->b = $b;\r\n        $this->str = $str;\r\n    }\r\n}\r\n\r\nclass B {\r\n    public $str;\r\n    public function __construct($str) {\r\n        $this->str = $str;\r\n    }\r\n}\r\n\r\n$dice = new Dice\\Dice;\r\n$rule = new Dice\\Rule;\r\n$rule->constructParams[] = ['B'];\r\n$dice->addRule('B',$rule);\r\n$a = $dice->create('A,['A']);\r\n\r\necho $a->b->str;\r\n```\r\nI would expect output `B` (of course this can be debated) but at the moment it will give `A` as the argument was not \"consumed\" but passed down the graph."}}