Skip to content

$keyPath must not be accessed before initialization #1814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JC5 opened this issue May 5, 2025 · 5 comments
Open

$keyPath must not be accessed before initialization #1814

JC5 opened this issue May 5, 2025 · 5 comments

Comments

@JC5
Copy link

JC5 commented May 5, 2025

Passport Version

13.0

Laravel Version

12.12

PHP Version

8.4.5

Database Driver & Version

NA

Description

Fresh installation of Laravel + Passport.

Run: php artisan passport:keys. Results in error:

   Error

  Typed static property Laravel\Passport\Passport::$keyPath must not be accessed before initialization

  at vendor/laravel/passport/src/Passport.php:407
    403▕     public static function keyPath(string $file): string
    404▕     {
    405▕         $file = ltrim($file, '/\\');
    406▕
  ➜ 407▕         return static::$keyPath
    408▕             ? rtrim(static::$keyPath, '/\\').DIRECTORY_SEPARATOR.$file
    409▕             : storage_path($file);
    410▕     }
    411▕

      +14 vendor frames

  15  artisan:16
      Illuminate\Foundation\Application::handleCommand()

Steps To Reproduce

composer create-project "laravel/laravel:^12.0" example-app
cd example-app/
composer require laravel/passport
php artisan passport:keys
php -v
history
@hafezdivandari
Copy link
Contributor

Fixed via #1811

@JC5
Copy link
Author

JC5 commented May 5, 2025

Nice. Is it now a matter of waiting for a new release?

@ConnySjoblom
Copy link

Any idea when this will be released?

@delboy1978uk
Copy link

alias the dev branch until it is released #1811 (comment)

@owenvoke
Copy link
Contributor

This was released in v13.0.1 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants