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.

Mushfiqur Rahman
  • 306
  • 4
  • 18

1 Answers1

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.

kenorb
  • 155,785
  • 88
  • 678
  • 743
hassan
  • 7,812
  • 2
  • 25
  • 36