{"action":"reopened","number":1894,"pull_request":{"url":"https://api.github.com/repos/Codeception/Codeception/pulls/1894","id":34605283,"html_url":"https://github.com/Codeception/Codeception/pull/1894","diff_url":"https://github.com/Codeception/Codeception/pull/1894.diff","patch_url":"https://github.com/Codeception/Codeception/pull/1894.patch","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/1894","number":1894,"state":"open","locked":false,"title":"Fix undefined field in generated Actions trait","user":{"login":"sustmi","id":885946,"avatar_url":"https://avatars.githubusercontent.com/u/885946?v=3","gravatar_id":"","url":"https://api.github.com/users/sustmi","html_url":"https://github.com/sustmi","followers_url":"https://api.github.com/users/sustmi/followers","following_url":"https://api.github.com/users/sustmi/following{/other_user}","gists_url":"https://api.github.com/users/sustmi/gists{/gist_id}","starred_url":"https://api.github.com/users/sustmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sustmi/subscriptions","organizations_url":"https://api.github.com/users/sustmi/orgs","repos_url":"https://api.github.com/users/sustmi/repos","events_url":"https://api.github.com/users/sustmi/events{/privacy}","received_events_url":"https://api.github.com/users/sustmi/received_events","type":"User","site_admin":false},"body":"PhpStorm IDE reports an undefined field `scenario` in generated *Actions trait.\r\nFor example here:\r\n```\r\npublic function canSee($text, $selector = null) {\r\n    return $this->scenario->runStep(new \\Codeception\\Step\\ConditionalAssertion('see', func_get_args()));\r\n}\r\n```\r\nI think it makes sense, because there is no such field defined in the trait and you can't be sure that the trait will always be inserted into a class that has the field defined.\r\n\r\nThere is a possibility to define a field in the trait itself, but if it conflicts with the field of same name in the imported class PHP issues either E_STRICT (if the definition is the same) or E_FATAL (if it's not the same) - see http://php.net/manual/en/language.oop5.traits.php#language.oop5.traits.properties .\r\n\r\nTherefore I suggest to declare an abstract method `getScenario()` which is basically like specifying  the interface of the class importing the trait (it imposes the importing class to have such method - see http://php.net/manual/en/language.oop5.traits.php#language.oop5.traits.abstract ).","created_at":"2015-05-03T18:31:05Z","updated_at":"2015-05-04T08:01:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b74cfc960898c5645b34aaf8270faac879f72797","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Codeception/Codeception/pulls/1894/commits","review_comments_url":"https://api.github.com/repos/Codeception/Codeception/pulls/1894/comments","review_comment_url":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/1894/comments","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/54fd9ccbf624eebca88c406a1dd62ac5d0ccc16a","head":{"label":"sustmi:fix-actions-trait-undefined-field","ref":"fix-actions-trait-undefined-field","sha":"54fd9ccbf624eebca88c406a1dd62ac5d0ccc16a","user":{"login":"sustmi","id":885946,"avatar_url":"https://avatars.githubusercontent.com/u/885946?v=3","gravatar_id":"","url":"https://api.github.com/users/sustmi","html_url":"https://github.com/sustmi","followers_url":"https://api.github.com/users/sustmi/followers","following_url":"https://api.github.com/users/sustmi/following{/other_user}","gists_url":"https://api.github.com/users/sustmi/gists{/gist_id}","starred_url":"https://api.github.com/users/sustmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sustmi/subscriptions","organizations_url":"https://api.github.com/users/sustmi/orgs","repos_url":"https://api.github.com/users/sustmi/repos","events_url":"https://api.github.com/users/sustmi/events{/privacy}","received_events_url":"https://api.github.com/users/sustmi/received_events","type":"User","site_admin":false},"repo":{"id":34986638,"name":"Codeception","full_name":"sustmi/Codeception","owner":{"login":"sustmi","id":885946,"avatar_url":"https://avatars.githubusercontent.com/u/885946?v=3","gravatar_id":"","url":"https://api.github.com/users/sustmi","html_url":"https://github.com/sustmi","followers_url":"https://api.github.com/users/sustmi/followers","following_url":"https://api.github.com/users/sustmi/following{/other_user}","gists_url":"https://api.github.com/users/sustmi/gists{/gist_id}","starred_url":"https://api.github.com/users/sustmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sustmi/subscriptions","organizations_url":"https://api.github.com/users/sustmi/orgs","repos_url":"https://api.github.com/users/sustmi/repos","events_url":"https://api.github.com/users/sustmi/events{/privacy}","received_events_url":"https://api.github.com/users/sustmi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sustmi/Codeception","description":"Full-stack testing PHP framework","fork":true,"url":"https://api.github.com/repos/sustmi/Codeception","forks_url":"https://api.github.com/repos/sustmi/Codeception/forks","keys_url":"https://api.github.com/repos/sustmi/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sustmi/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sustmi/Codeception/teams","hooks_url":"https://api.github.com/repos/sustmi/Codeception/hooks","issue_events_url":"https://api.github.com/repos/sustmi/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/sustmi/Codeception/events","assignees_url":"https://api.github.com/repos/sustmi/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/sustmi/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/sustmi/Codeception/tags","blobs_url":"https://api.github.com/repos/sustmi/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sustmi/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sustmi/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/sustmi/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sustmi/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/sustmi/Codeception/languages","stargazers_url":"https://api.github.com/repos/sustmi/Codeception/stargazers","contributors_url":"https://api.github.com/repos/sustmi/Codeception/contributors","subscribers_url":"https://api.github.com/repos/sustmi/Codeception/subscribers","subscription_url":"https://api.github.com/repos/sustmi/Codeception/subscription","commits_url":"https://api.github.com/repos/sustmi/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/sustmi/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/sustmi/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/sustmi/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/sustmi/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/sustmi/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sustmi/Codeception/merges","archive_url":"https://api.github.com/repos/sustmi/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sustmi/Codeception/downloads","issues_url":"https://api.github.com/repos/sustmi/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/sustmi/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/sustmi/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/sustmi/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sustmi/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/sustmi/Codeception/releases{/id}","created_at":"2015-05-03T13:19:10Z","updated_at":"2015-05-03T13:19:12Z","pushed_at":"2015-05-04T07:21:55Z","git_url":"git://github.com/sustmi/Codeception.git","ssh_url":"git@github.com:sustmi/Codeception.git","clone_url":"https://github.com/sustmi/Codeception.git","svn_url":"https://github.com/sustmi/Codeception","homepage":"http://codeception.com","size":64995,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"2.0"}},"base":{"label":"Codeception:master","ref":"master","sha":"7b0680b4317d82133507813f3829863c6066a8bc","user":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"repo":{"id":2880469,"name":"Codeception","full_name":"Codeception/Codeception","owner":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Codeception/Codeception","description":"Full-stack testing PHP framework","fork":false,"url":"https://api.github.com/repos/Codeception/Codeception","forks_url":"https://api.github.com/repos/Codeception/Codeception/forks","keys_url":"https://api.github.com/repos/Codeception/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Codeception/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Codeception/Codeception/teams","hooks_url":"https://api.github.com/repos/Codeception/Codeception/hooks","issue_events_url":"https://api.github.com/repos/Codeception/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/Codeception/Codeception/events","assignees_url":"https://api.github.com/repos/Codeception/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/Codeception/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/Codeception/Codeception/tags","blobs_url":"https://api.github.com/repos/Codeception/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Codeception/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Codeception/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/Codeception/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/Codeception/Codeception/languages","stargazers_url":"https://api.github.com/repos/Codeception/Codeception/stargazers","contributors_url":"https://api.github.com/repos/Codeception/Codeception/contributors","subscribers_url":"https://api.github.com/repos/Codeception/Codeception/subscribers","subscription_url":"https://api.github.com/repos/Codeception/Codeception/subscription","commits_url":"https://api.github.com/repos/Codeception/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/Codeception/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/Codeception/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/Codeception/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/Codeception/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/Codeception/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Codeception/Codeception/merges","archive_url":"https://api.github.com/repos/Codeception/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Codeception/Codeception/downloads","issues_url":"https://api.github.com/repos/Codeception/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/Codeception/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/Codeception/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/Codeception/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Codeception/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/Codeception/Codeception/releases{/id}","created_at":"2011-11-30T04:06:44Z","updated_at":"2015-05-04T02:48:49Z","pushed_at":"2015-05-04T07:25:24Z","git_url":"git://github.com/Codeception/Codeception.git","ssh_url":"git@github.com:Codeception/Codeception.git","clone_url":"https://github.com/Codeception/Codeception.git","svn_url":"https://github.com/Codeception/Codeception","homepage":"http://codeception.com","size":64995,"stargazers_count":1459,"watchers_count":1459,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":571,"mirror_url":null,"open_issues_count":171,"forks":571,"open_issues":171,"watchers":1459,"default_branch":"2.0"}},"_links":{"self":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/1894"},"html":{"href":"https://github.com/Codeception/Codeception/pull/1894"},"issue":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/1894"},"comments":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/1894/comments"},"review_comments":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/1894/comments"},"review_comment":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/1894/commits"},"statuses":{"href":"https://api.github.com/repos/Codeception/Codeception/statuses/54fd9ccbf624eebca88c406a1dd62ac5d0ccc16a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":1,"review_comments":0,"commits":1,"additions":14,"deletions":2,"changed_files":2}}