When trying to install php-jwt facing trouble with auth0

吃可爱长大的小学妹 提交于 2019-12-11 07:55:03

问题


I'm trying to install php-jwt. When I enter the following command

composer require firebase/php-jwt

it gives the following error.

    Using version ^4.0 for firebase/php-jwt
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - auth0/auth0-php 4.0.12 requires firebase/php-jwt ^3.0 -> satisfiable by firebase/php-jwt[v3.0.0] but these conflict with your requirements or minimum-stability.
    - auth0/auth0-php 4.0.12 requires firebase/php-jwt ^3.0 -> satisfiable by firebase/php-jwt[v3.0.0] but these conflict with your requirements or minimum-stability.
    - auth0/auth0-php 4.0.12 requires firebase/php-jwt ^3.0 -> satisfiable by firebase/php-jwt[v3.0.0] but these conflict with your requirements or minimum-stability.
    - Installation request for auth0/auth0-php (locked at 4.0.12, required as ~4.0) -> satisfiable by auth0/auth0-php[4.0.12].


Installation failed, reverting ./composer.json to its original content.

For better understanding giving the screenshot here.

I've tried enough but couldn't find any good solution.


回答1:


that's because your are trying to install the latest version of php-jwt which is: 4.0 as shown at packagist.org.

In the same time which is another packages - seems to be auth0 is using older version of php-jwt which is 3.0, so you will have to install php-jwt with the version 3.0 as follows:

composer require firebase/php-jwt:^3.0

OR

update your auth0 package to the latest version which is using the latest major version of php-jwt as shown in here:

"firebase/php-jwt" : "^4.0"

Note: Don't forget to take a backup of your project before updating your packages.



来源:https://stackoverflow.com/questions/42532831/when-trying-to-install-php-jwt-facing-trouble-with-auth0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!