BenConstable/phpspec-laravel

RuntimeException: The "--env" option does not exist.

Closed this issue · 3 comments

I receive this error message whenever I let phpspec create new classes for me. It appears to work fine and creates the proper class, but then it tries to run phpspec again with the non-existent --env option. (from an older version perhaps?) If I comment out in PhpSpec/Laravel/Util/Laravel.php:257 everything works fine. Incidentally, I have APP_ENV defined in my .env file, but it doesn't seem to be picking this up. It seems like in Laravel 5 the way to do this is to simply putenv('APP_ENV=' . $this->getEnv()); which seems to work for me.

Same problem here...

Thanks for finding this. I'll be looking at all of the open issues over the next couple of weeks, and will be looking to release version 2.0 soon, now that the first Laravel 5 release is imminent.

I'm using putenv() now, and I've removed any references to --env. Hopefully you won't be seeing that error anymore.