作曲家将Laravel用于JWT时出错



遵循本指南:https://laravel-angular.io/docs/1/jwt-auth-install/我已正确安装tymon/jwt-auth:^1.0@dev。一切正常,但是,当我运行:composer require irazasyed/jwt-auth-guard时,会出现此错误。

composer require irazasyed/jwt-auth-guard
Using version ^1.0 for irazasyed/jwt-auth-guard
./composer.json has been updated
Running composer update irazasyed/jwt-auth-guard
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- irazasyed/jwt-auth-guard[dev-master, v1.0.0, ..., v1.0.4] 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.
- irazasyed/jwt-auth-guard 1.0.x-dev is an alias of irazasyed/jwt-auth-guard dev-master and thus requires it to be installed too.
- Root composer.json requires irazasyed/jwt-auth-guard ^1.0 -> satisfiable by irazasyed/jwt-auth-guard[v1.0.0, ..., 1.0.x-dev (alias of dev-master)].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

我的PHP版本是:7.4.16;

我的Laravel版本是:8.12;

我的作曲家版本是:2.0.9。

我不知道该怎么办。谢谢大家的帮助!

更新:

这是运行composer require irazasyed/jwt-auth-guard --ignore-platform-reqs:后的错误

Using version ^1.0 for irazasyed/jwt-auth-guard
./composer.json has been updated
Running composer update irazasyed/jwt-auth-guard
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- irazasyed/jwt-auth-guard[dev-master, v1.0.0, ..., v1.0.4] 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.
- irazasyed/jwt-auth-guard 1.0.x-dev is an alias of irazasyed/jwt-auth-guard dev-master and thus requires it to be installed too.
- Root composer.json requires irazasyed/jwt-auth-guard ^1.0 -> satisfiable by irazasyed/jwt-auth-guard[v1.0.0, ..., 1.0.x-dev (alias of dev-master)].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

lcobucci/jwt是一个与框架无关的PHP库,允许您基于RFC 7519发布、解析和验证JSON Web令牌。

通过运行以下命令,您可以安装它。

composer require lcobucci/jwt

你可以在这里找到更多的文档

https://lcobucci-jwt.readthedocs.io/en/latest/

相关内容

  • 没有找到相关文章

最新更新