{"action":"created","issue":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/982","repository_url":"https://api.github.com/repos/phpspec/phpspec","labels_url":"https://api.github.com/repos/phpspec/phpspec/issues/982/labels{/name}","comments_url":"https://api.github.com/repos/phpspec/phpspec/issues/982/comments","events_url":"https://api.github.com/repos/phpspec/phpspec/issues/982/events","html_url":"https://github.com/phpspec/phpspec/issues/982","id":169939435,"number":982,"title":"shouldImplement order breaks beConstructedWith","user":{"login":"senkal","id":769204,"avatar_url":"https://avatars.githubusercontent.com/u/769204?v=3","gravatar_id":"","url":"https://api.github.com/users/senkal","html_url":"https://github.com/senkal","followers_url":"https://api.github.com/users/senkal/followers","following_url":"https://api.github.com/users/senkal/following{/other_user}","gists_url":"https://api.github.com/users/senkal/gists{/gist_id}","starred_url":"https://api.github.com/users/senkal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senkal/subscriptions","organizations_url":"https://api.github.com/users/senkal/orgs","repos_url":"https://api.github.com/users/senkal/repos","events_url":"https://api.github.com/users/senkal/events{/privacy}","received_events_url":"https://api.github.com/users/senkal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-08T14:39:11Z","updated_at":"2016-08-29T08:43:02Z","closed_at":null,"body":"Hi,\r\nI found some weird issue with order of the matchers in phpspec.\r\nThis is a vanilla example of this:\r\nhttps://github.com/senkal/phpspec-issue-example/tree/master\r\nOne entity I test: https://github.com/senkal/phpspec-issue-example/blob/master/src/Entity.php\r\nOne spec, first fails, second passes: https://github.com/senkal/phpspec-issue-example/blob/master/spec/EntitySpec.php\r\n\r\nAs you can see order in which you call should implement matters, this works:\r\n```\r\n        $this->shouldImplement(UserInterface::class);\r\n        $this->beAnInstanceOf(Entity::class);\r\n```\r\n\r\nThis fails:\r\n```\r\n\r\n        $this->beAnInstanceOf(Entity::class);\r\n        $this->shouldImplement(UserInterface::class);\r\n```\r\n```\r\n  16  - it is initializable this fails\r\n      error: Argument 1 passed to Entity::__construct() must be an instance of stdClass, none given in\r\n      /{...}/phpspec-issue-example/src/Entity.php line 10\r\n```\r\nJust clone my repo and run `composer install` and `vendor/bin/phpspec r`\r\nIs it normal behaviour?"},"comment":{"url":"https://api.github.com/repos/phpspec/phpspec/issues/comments/243066806","html_url":"https://github.com/phpspec/phpspec/issues/982#issuecomment-243066806","issue_url":"https://api.github.com/repos/phpspec/phpspec/issues/982","id":243066806,"user":{"login":"ciaranmcnulty","id":237866,"avatar_url":"https://avatars.githubusercontent.com/u/237866?v=3","gravatar_id":"","url":"https://api.github.com/users/ciaranmcnulty","html_url":"https://github.com/ciaranmcnulty","followers_url":"https://api.github.com/users/ciaranmcnulty/followers","following_url":"https://api.github.com/users/ciaranmcnulty/following{/other_user}","gists_url":"https://api.github.com/users/ciaranmcnulty/gists{/gist_id}","starred_url":"https://api.github.com/users/ciaranmcnulty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciaranmcnulty/subscriptions","organizations_url":"https://api.github.com/users/ciaranmcnulty/orgs","repos_url":"https://api.github.com/users/ciaranmcnulty/repos","events_url":"https://api.github.com/users/ciaranmcnulty/events{/privacy}","received_events_url":"https://api.github.com/users/ciaranmcnulty/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T08:43:02Z","updated_at":"2016-08-29T08:43:02Z","body":"Are you conflating `shouldBeAnInstanceOf` with `beAnInstanceOf`?"}}
{"actor":{"display_login":"ciaranmcnulty"}}