Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

browntown's avatar

artisan package:discover -> Class 'Illuminate\Foundation\Application' not found in bootstrap/app.php

I'm having trouble deploying my Laravel 5.5 app to my staging environment. Everything is fine in my local environment.

I'm using Rocketeer to deploy to my staging and production environments.

the "artisan package:discover" script that gets called in the post-autoload-dump hook of my composer.json file is rendering the following error in my rocketeer log:

"@php artisan package:discover PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in bootstrap/app.php:14"

After rocketeer deploys the code there are some things that happen...symlinks are created, artisan cache:clear, artisan passport:keys, composer dump-autoload.

I've tried deleting the vendor directory, doing a new composer install locally, adding composer install --no-scripts to the tasks that get executed after the code is deployed...still no luck.

It should be noted that I'm using the same rocketeer scripts with a site running Laravel 5.3 without any issue. I can deploy that site fine.

Does anyone have any ideas?

0 likes
0 replies

Please or to participate in this conversation.