{"action":"created","issue":{"url":"https://api.github.com/repos/BenConstable/phpspec-laravel/issues/33","labels_url":"https://api.github.com/repos/BenConstable/phpspec-laravel/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/BenConstable/phpspec-laravel/issues/33/comments","events_url":"https://api.github.com/repos/BenConstable/phpspec-laravel/issues/33/events","html_url":"https://github.com/BenConstable/phpspec-laravel/issues/33","id":60452564,"number":33,"title":"Defining console_kernel_class causes issue with phpspec","user":{"login":"hackel","id":583677,"avatar_url":"https://avatars.githubusercontent.com/u/583677?v=3","gravatar_id":"","url":"https://api.github.com/users/hackel","html_url":"https://github.com/hackel","followers_url":"https://api.github.com/users/hackel/followers","following_url":"https://api.github.com/users/hackel/following{/other_user}","gists_url":"https://api.github.com/users/hackel/gists{/gist_id}","starred_url":"https://api.github.com/users/hackel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackel/subscriptions","organizations_url":"https://api.github.com/users/hackel/orgs","repos_url":"https://api.github.com/users/hackel/repos","events_url":"https://api.github.com/users/hackel/events{/privacy}","received_events_url":"https://api.github.com/users/hackel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-10T05:21:06Z","updated_at":"2015-03-15T16:06:59Z","closed_at":"2015-03-15T16:06:59Z","body":"If I set `console_kernel_class: MyApp\\Console\\Kernel` in my phpspec.yml, it causes phpspec to break.  I start seeing the following message with all failing (but not passing) specs when I run \"phpspec run\":\r\n```ObjDump\r\n  [InvalidArgumentException]     \r\n  Command \"run\" is not defined.  \r\n  Did you mean this?             \r\n      schedule:run               \r\n\r\nException trace:\r\n () at ./vendor/symfony/console/Symfony/Component/Console/Application.php:549\r\n Symfony\\Component\\Console\\Application->find() at ./vendor/symfony/console/Symfony/Component/Console/Application.php:192\r\n Symfony\\Component\\Console\\Application->doRun() at ./vendor/symfony/console/Symfony/Component/Console/Application.php:126\r\n Symfony\\Component\\Console\\Application->run() at ./vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:90\r\n Illuminate\\Foundation\\Console\\Kernel->handle() at ./vendor/benconstable/phpspec-laravel/src/PhpSpec/Laravel/Util/Laravel.php:289\r\n PhpSpec\\Laravel\\Util\\Laravel->createApplication() at ./vendor/benconstable/phpspec-laravel/src/PhpSpec/Laravel/Util/Laravel.php:95\r\n PhpSpec\\Laravel\\Util\\Laravel->refreshApplication() at ./vendor/benconstable/phpspec-laravel/src/PhpSpec/Laravel/Listener/LaravelListener.php:56\r\n PhpSpec\\Laravel\\Listener\\LaravelListener->beforeSpecification() at n/a:n/a\r\n call_user_func() at ./vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:164\r\n Symfony\\Component\\EventDispatcher\\EventDispatcher->doDispatch() at ./vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php:53\r\n Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch() at ./vendor/phpspec/phpspec/src/PhpSpec/Runner/SpecificationRunner.php:50\r\n PhpSpec\\Runner\\SpecificationRunner->run() at ./vendor/phpspec/phpspec/src/PhpSpec/Runner/SuiteRunner.php:56\r\n PhpSpec\\Runner\\SuiteRunner->run() at ./vendor/phpspec/phpspec/src/PhpSpec/Console/Command/RunCommand.php:113\r\n PhpSpec\\Console\\Command\\RunCommand->execute() at ./vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253\r\n Symfony\\Component\\Console\\Command\\Command->run() at ./vendor/symfony/console/Symfony/Component/Console/Application.php:882\r\n Symfony\\Component\\Console\\Application->doRunCommand() at ./vendor/symfony/console/Symfony/Component/Console/Application.php:195\r\n Symfony\\Component\\Console\\Application->doRun() at ./vendor/phpspec/phpspec/src/PhpSpec/Console/Application.php:77\r\n PhpSpec\\Console\\Application->doRun() at ./vendor/symfony/console/Symfony/Component/Console/Application.php:126\r\n Symfony\\Component\\Console\\Application->run() at ./vendor/phpspec/phpspec/bin/phpspec:26\r\n```\r\n\r\nThis behaviour was confirmed by @onbjerg in issue #31.\r\n\r\nThe issue arose for me because I am using my custom Console\\Kernel class to override the bootstrapping in order to use a custom Http\\Request class."},"comment":{"url":"https://api.github.com/repos/BenConstable/phpspec-laravel/issues/comments/81130120","html_url":"https://github.com/BenConstable/phpspec-laravel/issues/33#issuecomment-81130120","issue_url":"https://api.github.com/repos/BenConstable/phpspec-laravel/issues/33","id":81130120,"user":{"login":"BenConstable","id":817029,"avatar_url":"https://avatars.githubusercontent.com/u/817029?v=3","gravatar_id":"","url":"https://api.github.com/users/BenConstable","html_url":"https://github.com/BenConstable","followers_url":"https://api.github.com/users/BenConstable/followers","following_url":"https://api.github.com/users/BenConstable/following{/other_user}","gists_url":"https://api.github.com/users/BenConstable/gists{/gist_id}","starred_url":"https://api.github.com/users/BenConstable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenConstable/subscriptions","organizations_url":"https://api.github.com/users/BenConstable/orgs","repos_url":"https://api.github.com/users/BenConstable/repos","events_url":"https://api.github.com/users/BenConstable/events{/privacy}","received_events_url":"https://api.github.com/users/BenConstable/received_events","type":"User","site_admin":false},"created_at":"2015-03-15T16:06:58Z","updated_at":"2015-03-15T16:06:58Z","body":"I've made some changes to the extension that remove the `console_kernel_class` and `http_kernel_class` options from the config. You don't need a bootstrapped kernel to run unit tests (unlike when writing integration/functional tests), so I've [added a different solution](https://github.com/BenConstable/phpspec-laravel/blob/master/src/PhpSpec/Laravel/Util/Laravel.php#L90) that avoids the need to do it.\r\n\r\nThis'll sort the issue you're having, so I'm going to close this."}}