1

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.

enter image description here

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

1 Answer 1

4

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Very nice and elaborate answer but presented simply. Actually the answer was in the error message thrown by composer. Since I'm new in auth0 and php-jwt that's why thought it something very complex. However thanks for the answer.
Its working for me.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.