生成token时,报错:Could not create token: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead.
检查了2遍,使用步骤都没问题,就是生成token的时候报错,起初还以为是环境有问题,重新装了一下环境,结果还是报错,折腾了好久都没解决,想请教一下老师,下面是截图:
然后尝试在 tinker 中获取token,token可以输出,但是中间报了一堆错,百度查了一下,也没有找到相关的解决办法
系统版本:CenterOS 7
mysql 5.6
php 7.3
Nginx 1.18.0
Redis 6.0.8
错误详细信息:
PHP Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead.
PHP Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead.
PHP Deprecated: Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead.
PHP Deprecated: Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.
PHP Deprecated: Not specifying the signer and key to Builder#getToken() is deprecated.
Please move the arguments from Builder#sign() to Builder#getToken().
尝试过的办法: