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:
I tried a lot of solutions provided here and elsewhere. It did not work for me. I solved it by manually removing /var/www/html/bootstrap/cache/compiled.php and updating the autoload files:
rm /var/www/html/bootstrap/cache/compiled.php
composer dump-autoload
Since no one has mentioned orchestra/testbench yet I thought I'd just add the solution to my problem.
I was writing a Laravel package when I got this error in one of my unit tests. I was using orchestra/testbench
to enable testing of Laravel-specific parts of the code.
The problem was simply that the test class was extending PHPUnit\Framework\TestCase
instead of Orchestra\Testbench\TestCase
.
Just running
composer update
fixed the issue.
I had the same issue and none of the solutions here worked out
I've found that there's an exception of permission denied to config
folder
After fixing the permission everything worked!
How to figure it?
Put a break-point in
vendor/laravel/framework/src/illluminate/Foundation/Http/Kernel.php
line 101 inside the catch of the handle function.
This is how I've found out about the permission denied.
EDIT::
Because I wasn't satisfied with the rather clumsy debugging and reworking paths, etc to get the VM running smoothly, I reflected on the process and reinstalled the vagrant box laravel/homestead (virtualbox 1.0.1
)
For me the issue potentially stemmed from a missing comma in config/app.php
. The missing comma likely halted the compilation process and spit out the Uncaught ReflectionException: Class log does not exist
error.
This is not a direct answer, but serves more as a guide post to those who venture into this abyss of silent errors
System: macOS Sierra
Vagrant: 1.9.1
(Latest Version at time of writing)
VM: laravel/homestead (virtualbox 0.4.0
)
Laravel Version: 5.1.*
PHP: 7.0.*
After repeated attempts to resolve the issue which include:
Critically, (for me) it seemed it was the virtualbox version in the initial set up:
vagrant box add laravel/homestead
Instead try supplying the version number like so:
vagrant box add laravel/homestead
--box-version 0.4.0
misc:
I have attempted and failed with the following laravel/homestead
virtualbox versions:
1.0.1
(default)and laravel/homestead-7
:
0.2.1
Also this is due to a syntax error in some file in the conf/ directory or .env file.
In my case I got this error because I forget to put ::class
at the end of the line when adding a service provider and facade, to the array providers and alises in conf/app.php file. I corrected this and the error disappeared.