Problem/Motivation

Currently jwt module version 2.2.* or even 2.* does not support Drupal 11. This is a problem as we want to use the latest Drupal 11 features together with jwt module. There is https://www.drupal.org/project/jwt/issues/3504600 which talks about Drupal 11 support with new features and build a version 3 of the module. Why not simply keep the exact feature set, but just make it compatible with Drupal 11.

Proposed resolution

Make the module compatible with Drupal 11 without adding additional functionality/features.

Issue fork jwt-3553383

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lukas.fischer created an issue. See original summary.

lukas.fischer’s picture

This needs to be done based on upgrade status report:

Upgrade Status report

Contributed projects

JSON Web Token Authentication (JWT) 2.2.1

Scanned on Tue, 10/21/2025 - 15:53.
6 warnings found.

Check manually

Errors without Drupal source version numbers including parse errors and use of APIs from dependencies.
File name Line Error
web/modules/contrib/jwt/modules/users_jwt/src/Form/UsersGenerateKeyForm.php 99 The 'users_jwt/download_redirect' library is not defined because the defining extension is not installed. Cannot decide if it is deprecated or not.
web/modules/contrib/jwt/jwt.info.yml 5 Value of core_version_requirement: ^9.0 || ^10.0 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687.
web/modules/contrib/jwt/modules/jwt_path_auth/jwt_path_auth.info.yml 4 Value of core_version_requirement: ^9.0 || ^10.0 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687.
web/modules/contrib/jwt/modules/jwt_auth_consumer/jwt_auth_consumer.info.yml 4 Value of core_version_requirement: ^9.0 || ^10.0 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687.
web/modules/contrib/jwt/modules/users_jwt/users_jwt.info.yml 4 Value of core_version_requirement: ^9.0 || ^10.0 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687.
web/modules/contrib/jwt/modules/jwt_auth_issuer/jwt_auth_issuer.info.yml 4 Value of core_version_requirement: ^9.0 || ^10.0 is not compatible with the next major version of Drupal core. See https://drupal.org/node/3070687.
lukas.fischer’s picture

StatusFileSize
new2.47 KB

Please find attached a patch. I ran the tests and this were the results:

ddev exec env SIMPLETEST_BASE_URL=http://web SIMPLETEST_DB=mysql://db:db@db/db \
  vendor/bin/phpunit --bootstrap /var/www/html/web/core/tests/bootstrap.php \
  web/modules/contrib/jwt/tests
PHPUnit 9.6.29 by Sebastian Bergmann and contributors.

.............                                                     13 / 13 (100%)

Time: 00:18.633, Memory: 4.00 MB

OK (13 tests, 213 assertions)
pwolanin’s picture

The CI is not running on Drupal 11.

If we can make that testing happens and it doesn't need any (or minimal) work, then it would be reasonable to add here.

pwolanin’s picture

The changes in the MR seem to take out testing Drupal 9 and probably break on Drupal 9.

I am not sure this is possible to do in a way that's going to work on 9, 10, and 11, so we may need instead to push out a 3.x branch sooner

borisson_’s picture

Status: Active » Needs review

I am not sure this is possible to do in a way that's going to work on 9, 10, and 11, so we may need instead to push out a 3.x branch sooner

Drupal 9 hasn't been supported for a while, so dropping support for it, even in a minor, does not seem like a problem to me? See also #3357742: Guidelines for semantic versioning for contributed projects in relation to Drupal core compatibility. Marking this issue as needs review.

pwolanin’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

pwolanin’s picture

Version: 2.2.1 » 2.3.0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.