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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3381022-2.patch | 1.72 KB | pwolanin |
Comments
Comment #2
pwolanin commentedLooks like this bugs happens when using the JWT library >= 6.6.0
A 3rd param was removed before, than added back differently for the decode() call.
Comment #3
pwolanin commentedComment #4
pwolanin commentedComment #5
ebeyrent commentedPatch looks sane to me
Comment #6
ebeyrent commentedComment #7
pwolanin commentedThanks Erich