Try composer update
Jan 10, 2021
8
Level 4
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.
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
Please or to participate in this conversation.