I’m attempting to get Laravel running on Google App Engine Standard. I already had it working on flexible, but requirements changed and we need standard now. I’m using the PHP 7.2 environment with Laravel 5.7. The deploy works but when trying to visit a page, I just get an error in the logs:
Symfony\Component\Debug\Exception\FatalThrowableError: Class 'Way\Generators\GeneratorsServiceProvider' not found
at Illuminate\Foundation\Application->register (/srv/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:662)
Line 662 for me locally at least is just return new $provider($this);
which doesn’t seem to be explicitly referencing the generators package.
That generator package appears to be way/generators
but when I do composer require way/generators
locally, it spits out a million different warnings followed by
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
In GeneratorsServiceProvider.php line 58:
Call to undefined method Illuminate\Foundation\Application::share()
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
From what I’ve read Laravel > 5 does not need the generators package as it already has it included but for some reason on GAE it’s trying to reference it (locally it runs fine with artisan serve
). I’ve tried all sorts of composer post install commands, but nothing has helped.
"post-install-cmd": [
"php artisan cache:clear",
"php artisan optimize:clear",
"php artisan config:clear",
"php artisan config:cache",
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize",
"chmod -R 755 bootstrap\/cache"
]