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

successdav's avatar

Upgraded my app to laravel 8 and php artisan not working

I upgraded my application to Laravel 8 following the upgrade guide https://laravel.com/docs/8.x/upgrade.

After running composer update, artisan ceases to work, I have used php artisan -v and no output, same with other artisan commands.

There is no error printed in the log file.

Edited.

0 likes
8 replies
successdav's avatar

still the same problem. I had even gone ahead to watch the video here on Laracast but the problem persists.

successdav's avatar
successdav
OP
Best Answer
Level 4

Ok, I have got this to work, and here is how. The problem was caused by app\Exceptions\Handler.php . I replace the content of this file

<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler
{
    /**
     * A list of the exception types that are not reported.
     *
     * @var array
     */
    protected $dontReport = [
        //
    ];

    /**
     * A list of the inputs that are never flashed for validation exceptions.
     *
     * @var array
     */
    protected $dontFlash = [
        'password',
        'password_confirmation',
    ];

    /**
     * Report or log an exception.
     *
     * @param  \Exception  $exception
     * @return void
     */
    public function report(Exception $exception)
    {
        parent::report($exception);
    }

    /**
     * Render an exception into an HTTP response.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Exception  $exception
     * @return \Illuminate\Http\Response
     */
    public function render($request, Exception $exception)
    {
        return parent::render($request, $exception);
    }
}

With the following content

<?php

namespace App\Exceptions;

use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;

class Handler extends ExceptionHandler
{
    /**
     * A list of the exception types that are not reported.
     *
     * @var array
     */
    protected $dontReport = [
        //
    ];

    /**
     * A list of the inputs that are never flashed for validation exceptions.
     *
     * @var array
     */
    protected $dontFlash = [
        'password',
        'password_confirmation',
    ];

    /**
     * Register the exception handling callbacks for the application.
     *
     * @return void
     */
    public function register()
    {
        $this->reportable(function (Throwable $e) {
            //
        });
    }
}

Now I am waiting to see what future errors I have caused by making this change, any advice is welcome. Thank you all for your help.

1 like
umihico's avatar

I had the same issue and this solved mine too. Thank you.

2 likes
David-R's avatar

Yep it worked for me as well for the upgrade to Laravel 8!

1 like

Please or to participate in this conversation.