Upgrade to PHP 8.1+ and Modern Tooling (Version 6.0) #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR upgrades the project to support PHP 8.1-8.4 and modernizes the development toolchain with PHPUnit 10/11 and Psalm static analysis.
Summary
This major version upgrade aligns the project with modern PHP standards and dependencies, particularly upgrading to
byjg/jwt-wrapper6.0. All tests pass and static analysis is clean.Major Changes
Dependency Updates
>=8.0→>=8.1 <8.54.9.*→^6.05.7.*|7.4.*|^9.6→^10|^11^5.9|^6.12for static analysisConfiguration Files
phpunit.xml.dist: Upgraded to PHPUnit 10+ format with strict error handling
<filter><whitelist>with<source><include>failOnWarning,failOnNotice,failOnDeprecationattributespsalm.xml: Added static analysis configuration (error level 4)
.gitignore: Added
phpunit.coverage.xml,phpunit.report.xml,*.bakcomposer.json: Added scripts for
testandpsalmcommandsGitHub Actions: Updated test matrix to PHP 8.1, 8.2, 8.3, 8.4
Code Changes
@dataProviderannotations to PHP 8 attributes#[Override]attributes to interface method implementationsSessionHandlerInterfacerequirementsBreaking Changes
>=8.0>=8.1 <8.5ByJG\Util\*ByJG\JwtWrapper\*ByJG\Util\JwtKeySecretByJG\JwtWrapper\JwtHashHmacSecretByJG\Util\JwtRsaKeyByJG\JwtWrapper\JwtOpenSSLKeystringarray5.7/7.4/9.6^10|^11boolint|falseCompatibility Notes
For Library Users
If you're upgrading from version 5.x to 6.0:
JwtSessionremains unchangedFor Contributors
If you're developing/testing this library:
composer psalmto check code qualityTesting
All tests pass on PHP 8.1, 8.2, 8.3, and 8.4:
Migration Guide
For projects using this library, update your
composer.json:{ "require": { "php": ">=8.1", "byjg/jwt-session": "^6.0" } }