tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.28k stars 1.55k forks source link

Conflicts with another require #2153

Open adiafora opened 2 years ago

adiafora commented 2 years ago

Hello. I have an error when installing via composer:

Problem 1
    - Root composer.json requires tymon/jwt-auth ^0.5.12 -> satisfiable by tymon/jwt-auth[0.5.12].
    - tymon/jwt-auth 0.5.12 requires illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., 5.8.x-dev] but these were not loaded, likely because it conflicts with another require.

PHP 8, Laravel 8 Other dependencies:

"require": {
    "php": "^8.0",
    "darkaonline/l5-swagger": "^8.0",
    "fruitcake/laravel-cors": "^2.0",
    "guzzlehttp/guzzle": "^7.0.1",
    "laravel/framework": "^8.54",
    "laravel/sanctum": "^2.11",
    "laravel/tinker": "^2.5",
    "phpunit/phpunit": "^9.3.3",
    "predis/predis": "^1.1"
},
"require-dev": {
    "facade/ignition": "^2.5",
    "fakerphp/faker": "^1.9.1",
    "laravel/sail": "^1.0.1",
    "mockery/mockery": "^1.4.2",
    "nunomaduro/collision": "^5.0"
},
RomkaLTU commented 2 years ago

Same here

rkpinheiro commented 2 years ago

+1

JhonatanPatrocinio commented 2 years ago

+1

thenexxuz-zz commented 2 years ago

Has anyone come up with a fix/workaround for this yet?

RomkaLTU commented 2 years ago

If I remember correctly, I used version 1 instead of 0.x

"tymon/jwt-auth": "^1.0"

rkpinheiro commented 2 years ago

@thenexxuz You can run composer require tymon/jwt-auth --ignore-platform-reqs instead

rkpinheiro commented 2 years ago

Looks like "tymon/jwt-auth": "^1.0" is a good candidate for php8 but it isn't compatible yet. please check https://github.com/tymondesigns/jwt-auth/blob/1.0.2/composer.json

"php": "^5.5.9|^7.0"

leon0399 commented 2 years ago

This and other issues are already fixed in this fork: https://github.com/PHP-Open-Source-Saver/jwt-auth

michug commented 2 years ago

using "tymon/jwt-auth": "^1.0" worked for me with PHP 8 and Laravel 8

catwhocode commented 2 years ago

got similar message, which dissapeared when invoking it this way

composer require tymon/jwt-auth:*

oayoub84 commented 2 years ago

For PHP 8, the package version is dev-develop / 1.0.x-dev, which i guess not ready for production.