skip to Main Content

Running php artisan passport:install after upgrading from php7.4 to php8.1 throws:

Class "" not found error

code

I have tried to bypass this error by checking for isClass before passing $concrete value to ReflectionClass method in Container.php, but this later lead to:

Type error: LaravelPassportConsoleClientCommand::handle(): Argument #1 ($clients) must be of type LaravelPassportClientRepository, null given

Where is this empty value comes from when run php artisan passport:install? Where is the ReflectionClass get the list of class to check from?

2

Answers


  1. Chosen as BEST ANSWER

    Thank you matiaslauriti and MamaD. I found the update for the Container package here: https://github.com/illuminate/container. Hope this can help someone else.


  2. Never change any code of the vendor because after a composer update all your codes will disappear and rollback to the original.

    When you upgrade your Laravel version, you need to do

    composer install
    composer dump-autoload -o
    

    to make sure all packages are consistent with your new version.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search