在 Laravel 9 中安装 tymon jwt auth 时出现问题

O. *_*ave 2 php jwt laravel

我在 Laravel 9 中安装时遇到问题。我不知道可能是 tymon jwt auth 尚未与 Laravel 9 兼容。这是我在下面遇到的错误。

当我跑时composer require tymon/jwt-auth

Problem 1
- Root composer.json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
- tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require tymon/jwt-auth:*" to figure out if any version is installable, or "composer require tymon/jwt-auth:^2.1" if you know which you need.
Run Code Online (Sandbox Code Playgroud)

当我跑时composer require tymon/jwt-auth "^1.0"

Problem 1
- tymon/jwt-auth dev-develop requires illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth 1.0.0-alpha1 requires illuminate/auth 5.1.* || 5.2.* -> found illuminate/auth[v5.1.1, ..., 5.2.x-dev] but these were not loaded, likely because it conflicts with another require.
- tymon/jwt-auth[1.0.0-alpha.2, ..., 1.0.0-rc.4.1] require php ^5.5.9 || ^7.0 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth[1.0.0-rc.5, ..., 1.0.2] require php ^5.5.9|^7.0 -> your php version (8.1.1) does not satisfy that requirement.
- tymon/jwt-auth 1.0.x-dev is an alias of tymon/jwt-auth dev-develop and thus requires it to be installed too.
- Root composer.json requires tymon/jwt-auth ^1.0 -> satisfiable by tymon/jwt-auth[1.0.0-alpha1, ..., 1.0.x-dev (alias of dev-develop)].
Run Code Online (Sandbox Code Playgroud)

当我跑时composer require tymon/jwt-auth:"dev-develop"

Problem 1
- Root composer.json requires tymon/jwt-auth dev-develop -> satisfiable by tymon/jwt-auth[dev-develop].
- tymon/jwt-auth dev-develop requires illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
Run Code Online (Sandbox Code Playgroud)

当我运行 Composer require tymon/jwt-auth: *

    - tymon/jwt-auth[dev-dependabot/composer/yoast/phpunit-polyfills-tw-1.0.0, dev-dependabot/add-v2-config-file, dev-develop, 1.0.x-dev] require illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., 5.8.x-dev, v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - tymon/jwt-auth 2.0.x-dev requires php ^7.4 -> your php version (8.1.1) does not satisfy that requirement.
    - tymon/jwt-auth[0.1.0, ..., 0.3.6] require illuminate/support 4.2.* -> found illuminate/support[v4.2.0-BETA1, ..., 4.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - tymon/jwt-auth[0.3.7, ..., 0.4.3] require illuminate/support ~4.0 -> found illuminate/support[v4.0.0-BETA2, ..., 4.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - tymon/jwt-auth[dev-master, 0.5.0, ..., 0.5.12] require illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - tymon/jwt-auth 1.0.0-alpha1 requires illuminate/auth 5.1.* || 5.2.* -> found illuminate/auth[v5.1.1, ..., 5.2.x-dev] but these were not loaded, likely because it conflicts with another require.
    - tymon/jwt-auth[1.0.0-alpha.2, ..., 1.0.0-rc.4.1] require php ^5.5.9 || ^7.0 -> your php version (8.1.1) does not satisfy that requirement.
    - tymon/jwt-auth[1.0.0-rc.5, ..., 1.0.2] require php ^5.5.9|^7.0 -> your php version (8.1.1) does not satisfy that requirement.
    - tymon/jwt-auth 1.0.x-dev is an alias of tymon/jwt-auth dev-develop and thus requires it to be installed too.
    - Root composer.json requires tymon/jwt-auth * -> satisfiable by tymon/jwt-auth[dev-dependabot/composer/yoast/phpunit-polyfills-tw-1.0.0, dev-dependabot/add-v2-config-file, dev-master, dev-develop, 0.1.0, ..., 0.5.12, 1.0.0-alpha1, ..., 1.0.x-dev (alias of dev-develop), 2.0.x-dev].```
Run Code Online (Sandbox Code Playgroud)

小智 6

composer.json缺少更新

我用过这个:

composer require tomfordrumm/jwt-auth:dev-develop
Run Code Online (Sandbox Code Playgroud)