Skip to content

Fix PHP 8.5 compatibility#241

Merged
kelvinmo merged 1 commit intokelvinmo:masterfrom
shu-yusa:php85-compat
Apr 23, 2026
Merged

Fix PHP 8.5 compatibility#241
kelvinmo merged 1 commit intokelvinmo:masterfrom
shu-yusa:php85-compat

Conversation

@shu-yusa
Copy link
Copy Markdown
Contributor

@shu-yusa shu-yusa commented Apr 23, 2026

Issue: #242

Fix deprecations and add PHP 8.5 to the phpunit matrix.

Reproduction of warnings with tests (before fix):

% ./vendor/bin/phpunit  --display-deprecations
PHPUnit 11.5.50 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.5.5
Configuration: /***/simplejwt/phpunit.xml.dist

...........................DD.......D.......DDD.....DDD........  63 / 113 ( 55%)
.............DDDDDDDDDDD.DDDDDDDDDDD..........DD..              113 / 113 (100%)

Time: 00:00.120, Memory: 12.00 MB

There was 1 PHPUnit test runner warning:

1) No code coverage driver available

--

33 tests triggered 2 PHP deprecations:

1) /***/simplejwt/src/SimpleJWT/Util/ASN1/DER.php:289
ord(): Providing a string that is not one byte long is deprecated. Use ord($str[0]) instead

Triggered by:

* SimpleJWT\Crypt\KeyManagement\RSAESTest::testRSA1_5 (10 times)
  /***/simplejwt/tests/KeyManagement/RSAESTest.php:11
...

2) /***/simplejwt/src/SimpleJWT/Keys/KeySet.php:327
Using null as an array offset is deprecated, use an empty string instead

Triggered by:

* KeySetTest::testPassword (4 times)
  /***/simplejwt/tests/KeySetTest.php:37
...

@shu-yusa shu-yusa force-pushed the php85-compat branch 3 times, most recently from d56d0c4 to 8394c48 Compare April 23, 2026 03:03
@shu-yusa shu-yusa marked this pull request as ready for review April 23, 2026 03:21
@shu-yusa
Copy link
Copy Markdown
Contributor Author

cc: @kelvinmo

@kelvinmo kelvinmo merged commit 1580036 into kelvinmo:master Apr 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants