I am working on a legacy Laravel 6 app which is isolated from the rest of the system without internet connection, and when I try to run composer dump-autoload
I get:
In ProviderRepository.php line 208: Class 'Facade\Ignition\IgnitionServiceProvider' not found
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
So I can't do what's described in this post: Laravel with App Engine Standard Class 'Facade\Ignition\IgnitionServiceProvider' not found
Update #1: I added the missing class to the dont-discover
array in composer.json
, then it showed another class missing, so I started adding them one-by-one. Apparently the following 3 packages are "missing" (even though their files are there):
"facade/ignition"
, "laravel/ui"
, "nunomaduro/collision"
.
When added all these 3 to the dont-discover
array, I was successfully able to run composer dump-autoload
:
"extra": {
"laravel": {
"dont-discover": ["facade/ignition", "laravel/ui", "nunomaduro/collision"]
}
}
But still, I want to know if I can fix the issue with these 3 packages
Can I fix it without internet connection? Anything I can try to do manually?
Update #2:
I saw a comment on another post here suggesting moving the packages from require-dev
to require
. I did it, and it worked!
https://stackoverflow.com/a/59369455/18178584
In the same post, someone suggested it might be related to a bug when updating from composer 1.x to 2.x:
https://stackoverflow.com/a/67847239/18178584
But since I don't know exactly what happened here, which one of the above can be the cause? And, since the first solution solved it for me, is it safe to leave these 3 packages in require
instead of require-dev
?