【问题标题】:Error: In laravel 8 with passport 10 after running composer update command错误:运行 composer update 命令后在 laravel 8 中使用护照 10
【发布时间】:2020-11-26 12:42:44
【问题描述】:

我在 laravel 8 中使用护照包 10 创建护照令牌时出错。在运行 composer update 命令之前一切正常。当我运行 composer update 命令时,我得到了这个错误:-

message: "Method Laravel\Passport\Bridge\AccessToken::__toString() must not throw an 
          exception, caught ErrorException: Using integers for registered date claims is 
          deprecated, please use DateTimeImmutable objects instead."
exception: "Symfony\Component\ErrorHandler\Error\FatalError"

请在解决此错误时提供帮助。任何帮助都将不胜感激。

【问题讨论】:

标签: laravel


【解决方案1】:

目前的解决方案是降级 lcobucci/jwt 包。

composer require lcobucci/jwt:3.3.3

您也可以查看https://github.com/laravel/passport/issues/1380

【讨论】:

  • 感谢您的回答,我在github repo上也得到了解决方案。
猜你喜欢
  • 2016-01-15
  • 1970-01-01
  • 2018-09-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-09-01
  • 2016-07-21
  • 2018-12-23
相关资源
最近更新 更多