I have a similar problem. My tests all work fine on Vagrant, but when they are run on Scrutinizer as part of a pull request, they fail because they can't find Log::info();
I found out that this exception get thrown very early when starting the framework. I put an echo in Container.php to find out what is being resolved.
On my mac php artisan returns
App\Console\Kernel
Illuminate\Foundation\Bootstrap\DetectEnvironment
Illuminate\Foundation\Bootstrap\LoadConfiguration
App\Exceptions\Handler
log
PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /Users/freek/dev/laravel/vendor/laravel/framework/src/Illuminate/Container/Container.php:778
On homestead everything works fine. These classes are displayed:
Found the error. I got a custom config file with this contents
return [
'version' => '5.0.2',
'installDate' => (new DateTime('20150514')),
];
When removing usage of the DateTime-class php artisan runs without problems on my mac. I'm glad I found the source of the problem but I'm puzzled why use DateTime is causing an error.
I struggled with this error today, after upgrading to L5.2, and found it came down to my .env file.
The error was thrown because one of the values in this file had spaces. To fix, I just enclosed these values in double quotes.
These errors might occure early during Laravel startup because a Facade is used (in our case Log) before it has been loaded in the application Container through its service Provider.... It seems that Laravel 5.2 tries to Log some error beffore the Log class has been initilized yet...
@tomturton yes this was the problem for me too. Thanks for the solution - can you shed any light on to why this was happening. Anyone know why this was happening though!?