close

[Solved] Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 Error Occurs?

Today I get the following error Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 in php.

How To Solve Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 Error ?

  1. How To Solve Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 Error ?

    To Solve Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 Error I solve this error by deleting the vendor table then run composer update. I'm using Laravel 7. So, if you are not updating from the older Laravel version, maybe this is the solution.

  2. Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

    To Solve Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255 Error I solve this error by deleting the vendor table then run composer update. I'm using Laravel 7. So, if you are not updating from the older Laravel version, maybe this is the solution.

Solution 1

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

Solution 2

I solve this error by deleting the vendor table then run composer update. I’m using Laravel 7. So, if you are not updating from the older Laravel version, maybe this is the solution.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment