Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
This is how I solved this after an upgrade from laravel version 6.x - 7.x:
In App\Exceptions\Handler
changed
//Use Exception;Use Throwable;
Then methods to accept instances of Throwable
instead of Exceptions
as follows:
//public function report(Exception$exception);public function report(Throwable $exception);//public function render($request, Exception $exception);public function render($request, Throwable $exception);
In config\session.php
:
//'secure' => env('SESSION_SECURE_COOKIE', false),'secure' => env('SESSION_SECURE_COOKIE', null),
Then run composer update
I solved the problem this way:
cd bootstrap/cache/rm -rf *.php
The bootstrap directory contains the app.php file that initializes the structure. This directory also houses a cache directory that contains structure-generated files for performance optimization, such as files and route cache services. Laravel stores configuration files, provider, and cached services to optimize the fetching of this information. The problem with me was when the other developer ran the 'php artisan config: cache' command on your machine and since the cache folder contains files that can be deleted, I deleted them and solved the problem.