{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii-core/issues/46","repository_url":"https://api.github.com/repos/yiisoft/yii-core","labels_url":"https://api.github.com/repos/yiisoft/yii-core/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii-core/issues/46/comments","events_url":"https://api.github.com/repos/yiisoft/yii-core/issues/46/events","html_url":"https://github.com/yiisoft/yii-core/issues/46","id":369877233,"node_id":"MDU6SXNzdWUzNjk4NzcyMzM=","number":46,"title":"Test 'mode' and test 'environment' should be separate constants/app functions","user":{"login":"move[bot]","id":33596368,"node_id":"MDM6Qm90MzM1OTYzNjg=","avatar_url":"https://avatars1.githubusercontent.com/in/6673?v=4","gravatar_id":"","url":"https://api.github.com/users/move%5Bbot%5D","html_url":"https://github.com/apps/move","followers_url":"https://api.github.com/users/move%5Bbot%5D/followers","following_url":"https://api.github.com/users/move%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/move%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/move%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/move%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/move%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/move%5Bbot%5D/repos","events_url":"https://api.github.com/users/move%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/move%5Bbot%5D/received_events","type":"Bot","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-14T07:42:26Z","updated_at":"2018-10-14T07:42:29Z","closed_at":null,"author_association":"NONE","body":"*@rhertogh commented on Oct 11, 2018, 6:37 PM UTC:*\n\n### What steps will reproduce the problem?\n\n[#15847](https://github.com/yiisoft/yii2/issues/15847) and [#15202](https://github.com/yiisoft/yii2/issues/15202)\n\nIn our development flow we have 4 different environments, 'dev', 'test', 'staging' and 'production'.\nIn our deployment script we call `yii migrate` but when the migration fails on the 'test' environment the deployment script continues because no exception is thrown.\n\n### What is the expected result?\n\nAn exception should be thrown to abort the deployment.\n\n### What do you get instead?\n\nDeployment script continues.\n\n### Additional info\n\n| Q | A |\n| --- | --- |\n| Yii version | 2.0.x |\n| PHP version | 7.0 |\n| Operating system | CentOs 7 |\n\n### Proposed solution\n\nUse `YII_ENV_TEST` as indicator for the 'test environment' and exit the application when an exception occurs.\nAdd new constant `YII_TEST_MODE` for running the application in 'test mode' to continue the application after an exception. For example during the use of Codeception/PHPUnit.\n\n*This issue was moved by [samdark](https://github.com/samdark) from [yiisoft/yii2#16782](https://github.com/yiisoft/yii2/issues/16782).*"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii-core/issues/comments/429603971","html_url":"https://github.com/yiisoft/yii-core/issues/46#issuecomment-429603971","issue_url":"https://api.github.com/repos/yiisoft/yii-core/issues/46","id":429603971,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTYwMzk3MQ==","user":{"login":"move[bot]","id":33596368,"node_id":"MDM6Qm90MzM1OTYzNjg=","avatar_url":"https://avatars1.githubusercontent.com/in/6673?v=4","gravatar_id":"","url":"https://api.github.com/users/move%5Bbot%5D","html_url":"https://github.com/apps/move","followers_url":"https://api.github.com/users/move%5Bbot%5D/followers","following_url":"https://api.github.com/users/move%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/move%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/move%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/move%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/move%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/move%5Bbot%5D/repos","events_url":"https://api.github.com/users/move%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/move%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-10-14T07:42:29Z","updated_at":"2018-10-14T07:42:29Z","author_association":"NONE","body":"*@rhertogh commented on Oct 12, 2018, 9:01 AM UTC:*\n\n[samdark](https://github.com/samdark) As [klimov-paul](https://github.com/klimov-paul) described in [#15202 (comment)](https://github.com/yiisoft/yii2/issues/15202#issuecomment-346351890) \"Enforcing exit on error will cause it to terminate PHPUnit script\""}}
{"actor":{"display_login":"move"}}