I am currently trying to clone an existing project of mine from github. After clone I run composer install during the process I receive the following error:
The underlying error is revealed by modifying vendor/laravel/framework/src/Illuminate/Container/Container.php and placing the following at the top:
monolog = new Monolog("local");
}
}
}
//Add curly-braces around the original content, like so:
namespace Illuminate\Container {
//All original code in this file goes here.
//...
}
(Credit to https://laracasts.com/discuss/channels/general-discussion/class-log-does-not-exist/replies/160902 for this idea.)
To add to the list of root-causes for this message, defining a closure in a configuration file and calling php artisan config:cache subsequently will cause this (at least in Laravel 5.1). Solution for this manifestation: don't define closures in Laravel configuration files, per https://github.com/laravel/framework/issues/9625 .