JWT library >= 6.6.0 causes fatal (test failures on php 8.1 Drupal 10.1)

Created on 14 August 2023, over 1 year ago
Updated 31 August 2023, over 1 year ago

Problem/Motivation

https://www.drupal.org/pift-ci-job/2739778 β†’

Running automated tests with php 8.1 and Drupal 10.1 generates a couple fatal errors:

Drupal\Tests\users_jwt\Kernel\UsersJwtRequestTest
exception: [Other] Line 0 of sites/default/files/simpletest/phpunit-7.xml:
PHPUnit Test failed to complete; Error: PHPUnit 9.6.8 by Sebastian Bergmann and contributors.


There was 1 error:

1) Drupal\Tests\users_jwt\Kernel\UsersJwtRequestTest::testAuth
Error: Firebase\JWT\JWT::decode(): Argument #3 ($headers) cannot be passed by reference

/var/www/html/modules/contrib/jwt/modules/users_jwt/src/Authentication/Provider/UsersJwtAuth.php:103

Proposed resolution

Figure out how to fix this in a way that's compatible with JWT 5.5 and 6.x

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pwolanin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024