Update PHP versions in PHPUnit workflow to include 8.4 #20
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.
Summary
This pull request updates the JsonSerialize library for PHP 8.4 and PHP 8.5 compatibility, addressing deprecation warnings related to
ReflectionProperty::setAccessible()that became obsolete in PHP 8.1+. The changes also include CI/CD infrastructure updates and PHPStan configuration adjustments.Key Changes
PHP 8.5 Compatibility
setAccessible(true)for PHP versions below 8.1, where it's no longer necessary (properties are accessible by default in PHP 8.1+)JsonUnserializeMapconstructor to explicitly throw exceptions for invalid map parametersCI/CD Infrastructure
actions/checkoutandactions/cache) for better performance and continued supportCode Quality Improvements
Technical Impact
This update ensures the library remains compatible with the latest PHP versions (8.4 and 8.5) while maintaining backward compatibility with PHP 5.4+. The reflection API changes address deprecation warnings that would appear in production logs on modern PHP installations. The GitHub Actions upgrades future-proof the CI/CD pipeline against upcoming deprecations of older action versions.
No breaking changes are introduced—all modifications are internal compatibility adjustments that maintain the existing public API contract.