Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.6 Passport FatalThrowableError on php artisan passport:install --force

Tags:

laravel

I seem to be having a problem installing Laravel Passport, when running the command php artisan passport:install --force, I get the following error.

Symfony\Component\Debug\Exception\FatalThrowableError : Access to undeclared static property: Laravel\Passport\Passport::$client

at /Applications/MAMP/htdocs/xxxxxxxxx/alpha.platform.vuex/vendor/laravel/passport/src/Passport.php:413

    409|      * @return \Laravel\Passport\Client
    410|      */
    411|     public static function client()
    412|     {
  > 413|         return new static::$client;
    414|     }
    415| 
    416|     /**
    417|      * Set the personal access client model class name.

Not sure what has happened since running this command last night when it was working fine.

like image 316
JasonDisruptiv Avatar asked Nov 29 '25 19:11

JasonDisruptiv


1 Answers

So i have found the problem.

Old composer

   "require": {
        "php": "^7.1.3",
        "fideloper/proxy": "^4.0",
        "laravel/framework": "5.6.*",
        "laravel/passport": "^6.0",
        "laravel/tinker": "^1.0"
    },

New composer

"require": {
    "php": "^7.1.3",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "5.6.*",
    "laravel/passport": "^4.0.3",
    "laravel/tinker": "^1.0"
},

Rolled back the passport version and all seems to work as planned.

** Edit After checking out the repo, updates where made 3 days back causing the break, now rolled back to 6.0.0 , this issue has been flagged on github.

like image 101
JasonDisruptiv Avatar answered Dec 01 '25 11:12

JasonDisruptiv



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!