Laravel 12 + PHP 8.3 Support ?
composer require php-open-source-saver/jwt-auth
You are running Composer with SSL/TLS protection disabled. ./composer.json has been updated Running composer update php-open-source-saver/jwt-auth Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages.
Problem 1 - Root composer.json requires php-open-source-saver/jwt-auth * -> satisfiable by php-open-source-saver/jwt-auth[0.1.0, ..., 0.5.12, 1.0.0, ..., 1.4.2, 2.0.0, ..., v2.8.1]. - lcobucci/jwt 5.0.0 requires php ~8.1.0 || ~8.2.0 -> your php version (8.3.14) does not satisfy that requirement. - lcobucci/jwt[5.1.0, ..., 5.5.0] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
Alternatively you can require one of these packages that provide the extension (or parts of it):
Keep in mind that the suggestions are automated and may not be valid or safe to use
- paragonie/sodium_compat_ext_sodium
- juspay/expresscheckout-php-sdk Express Checkout SDK for PHP allows easy integration with Juspay's EC payments as a service platform
- vufind/vufind A flexible discovery layer.
- php-open-source-saver/jwt-auth[0.3.7, ..., 0.4.3] require illuminate/support ~4.0 -> found illuminate/support[v4.0.0, ..., v4.2.17] but these were not loaded,
likely because it conflicts with another require. - php-open-source-saver/jwt-auth[0.1.0, ..., 0.3.6] require illuminate/support 4.2.* -> found illuminate/support[v4.2.1, ..., v4.2.17] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[0.5.0, ..., 0.5.12] require illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[1.0.03, ..., 1.1.1] require illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[1.2.0, ..., 1.4.0] require illuminate/auth ^6|^7|^8 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth 1.4.1 requires illuminate/auth ^6|^7|^8|^9 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[1.4.2, 2.0.0] require illuminate/auth ^6|^7|^8.67|^9 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.67.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth 2.1.0 requires illuminate/auth ^6|^7|^8.67|^9|^10 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.67.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[2.2.0, ..., 2.2.2] require illuminate/auth ^6|^7|^8.67|^9|^10|^11 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.67.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28, v11.0.0, ..., v11.44.0] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[2.3.0, ..., 2.7.3] require illuminate/auth ^10|^11 -> found illuminate/auth[v10.0.0, ..., v10.48.28, v11.0.0, ..., v11.44.0] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth 2.8.0 requires lcobucci/jwt ^5.0 -> satisfiable by lcobucci/jwt[5.0.0, ..., 5.5.0]. - php-open-source-saver/jwt-auth v2.8.1 requires lcobucci/jwt ^5.4 -> satisfiable by lcobucci/jwt[5.4.0, ..., 5.5.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php8.3.14\php.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-sodium to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require php-open-source-saver/jwt-auth:*" to figure out if any version is installable, or "composer require php-open-source-saver/jwt-auth:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
You seem to have other outdated / conflicting dependencies.
Try with -W or please show your composer.json
[ Try 1 ]
composer require php-open-source-saver/jwt-auth --update-with-dependencies
You are running Composer with SSL/TLS protection disabled. ./composer.json has been updated Running composer update php-open-source-saver/jwt-auth --with-dependencies Loading composer repositories with package information Dependency laravel/framework is also a root requirement. Package has not been listed as an update argument, so keeping locked at old version. Use --with-all-dependencies (-W) to include root dependencies. Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1 - Root composer.json requires php-open-source-saver/jwt-auth * -> satisfiable by php-open-source-saver/jwt-auth[0.1.0, ..., 0.5.12, 1.0.0, ..., 1.4.2, 2.0.0, ..., v2.8.1]. - lcobucci/jwt 5.0.0 requires php ~8.1.0 || ~8.2.0 -> your php version (8.3.14) does not satisfy that requirement. - lcobucci/jwt[5.1.0, ..., 5.5.0] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
Alternatively you can require one of these packages that provide the extension (or parts of it):
Keep in mind that the suggestions are automated and may not be valid or safe to use
- paragonie/sodium_compat_ext_sodium
- juspay/expresscheckout-php-sdk Express Checkout SDK for PHP allows easy integration with Juspay's EC payments as a service platform
- vufind/vufind A flexible discovery layer.
- php-open-source-saver/jwt-auth[0.3.7, ..., 0.4.3] require illuminate/support ~4.0 -> found illuminate/support[v4.0.0, ..., v4.2.17] but these were not loaded,
likely because it conflicts with another require. - php-open-source-saver/jwt-auth[0.1.0, ..., 0.3.6] require illuminate/support 4.2.* -> found illuminate/support[v4.2.1, ..., v4.2.17] but these were not loaded, - php-open-source-saver/jwt-auth[0.5.0, ..., 0.5.12] require illuminate/support ~5.0 -> found illuminate/support[v5.0.0, ..., v5.8.36] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[1.0.0, ..., 1.0.2] require php ^5.5.9|^7.0 -> your php version (8.3.14) does not satisfy that requirement. - php-open-source-saver/jwt-auth[1.0.03, ..., 1.1.1] require illuminate/auth ^5.2|^6|^7|^8 -> found illuminate/auth[v5.2.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[1.2.0, ..., 1.4.0] require illuminate/auth ^6|^7|^8 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth 1.4.1 requires illuminate/auth ^6|^7|^8|^9 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[1.4.2, 2.0.0] require illuminate/auth ^6|^7|^8.67|^9 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.67.0, ..., v8.83.27, v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth 2.1.0 requires illuminate/auth ^6|^7|^8.67|^9|^10 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.67.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[2.2.0, ..., 2.2.2] require illuminate/auth ^6|^7|^8.67|^9|^10|^11 -> found illuminate/auth[v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.67.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.28, v11.0.0, ..., v11.44.0] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth[2.3.0, ..., 2.7.3] require illuminate/auth ^10|^11 -> found illuminate/auth[v10.0.0, ..., v10.48.28, v11.0.0, ..., v11.44.0] but these were not loaded, likely because it conflicts with another require. - php-open-source-saver/jwt-auth 2.8.0 requires lcobucci/jwt ^5.0 -> satisfiable by lcobucci/jwt[5.0.0, ..., 5.5.0]. - php-open-source-saver/jwt-auth v2.8.1 requires lcobucci/jwt ^5.4 -> satisfiable by lcobucci/jwt[5.4.0, ..., 5.5.0].
To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php8.3.14\php.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-sodium to temporarily ignore these required extensions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require php-open-source-saver/jwt-auth:*" to figure out if any version is installable, or "composer require php-open-source-saver/jwt-auth:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
[ Try 2 ]
composer require php-open-source-saver/jwt-auth --update-with-all-dependencies
You are running Composer with SSL/TLS protection disabled. ./composer.json has been updated Running composer update php-open-source-saver/jwt-auth --with-all-dependencies Loading composer repositories with package information Updating dependencies
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
In CurlDownloader.php line 660: The "https://packagist.org/providers/ext-sodium.json" file could not be downloaded (HTTP/2 502 )
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-m|--minimal-changes] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [
Installation failed........
please show your
composer.json
{ "$schema": "https://getcomposer.org/schema.json", "name": "laravel/laravel", "type": "project", "description": "The skeleton application for the Laravel framework.", "keywords": ["laravel", "framework"], "license": "MIT", "require": { "php": "^8.2", "aws/aws-sdk-php": "^3.340", "guzzlehttp/guzzle": "^7.9", "laravel/framework": "^12.0", "laravel/reverb": "^1.0", "laravel/sanctum": "^4.0", "laravel/tinker": "^2.10.1", "league/flysystem-aws-s3-v3": "^3.29", "spatie/laravel-ignition": "^2.9" }, "require-dev": { "fakerphp/faker": "^1.23", "laravel/breeze": "^2.3", "laravel/pail": "^1.2.2", "laravel/pint": "^1.13", "laravel/sail": "^1.41", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.6", "pestphp/pest": "^3.7", "pestphp/pest-plugin-laravel": "^3.1" }, "autoload": { "psr-4": { "App\": "app/", "Database\Factories\": "database/factories/", "Database\Seeders\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\Foundation\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r "file_exists('.env') || copy('.env.example', '.env');"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi", "@php -r "file_exists('database/database.sqlite') || touch('database/database.sqlite');"", "@php artisan migrate --graceful --ansi" ], "dev": [ "Composer\Config::disableProcessTimeout", "npx concurrently -c "#93c5fd,#c4b5fd,#fb7185,#fdba74" "php artisan serve" "php artisan queue:listen --tries=1" "php artisan pail --timeout=0" "npm run dev" --names=server,queue,logs,vite" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, "php-http/discovery": true } }, "minimum-stability": "stable", "prefer-stable": true }
Works for me (MacOS):
$ composer require php-open-source-saver/jwt-auth
./composer.json has been updated
Running composer update php-open-source-saver/jwt-auth
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
- Locking lcobucci/jwt (5.5.0)
- Locking namshi/jose (7.2.3)
- Locking php-open-source-saver/jwt-auth (v2.8.1)
- Locking symfony/polyfill-php56 (v1.20.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
- Downloading php-open-source-saver/jwt-auth (v2.8.1)
- Installing symfony/polyfill-php56 (v1.20.0)
- Installing namshi/jose (7.2.3): Extracting archive
- Installing lcobucci/jwt (5.5.0): Extracting archive
- Installing php-open-source-saver/jwt-auth (v2.8.1): Extracting archive
2 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
103 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^2.8 for php-open-source-saver/jwt-auth
Are you possible behind a firewall? I saw this:
In CurlDownloader.php line 660: The "https://packagist.org/providers/ext-sodium.json" file could not be downloaded (HTTP/2 502 )
Or it's a dep issue with (something else) on Windows?
I think the problem is that in your Windows installation you don't have the sodium (cryptographic extension) available/enabled.
jwt-auth itself does not directly use it, but with the version constraints of Laravel 12 and the PHP version, you can only use the latest jwt-auth using the dependency lcobucci/jwt:^5 which requires ext-sodium (this was introduced with lcobucci/jwt 4.1.x, older ones used only openssl).
I see , try your suggestion .
( Using environment Windows 10 + wampserver 3.3.7 + PHP 8.3 + laravel 12 )
@mfn is correct, the problem is right there in your OP:
require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.