jsonmapper
jsonmapper copied to clipboard
Add support for PHP 8.4 and 8.5
General
- Fail phpunit tests on all issues (PHP warnings, deprecations etc.)
PHP 8.4
- Run tests on PHP 8.4
- Fix deprecated use of implicitly nullable parameters
- This feature is available since PHP 7.1, which is the lowest supported version in
composer.json, so there are no backward compatibility issues - https://www.php.net/manual/en/migration71.new-features.php#migration71.new-features.nullable-types
- https://www.php.net/manual/en/migration84.deprecated.php#migration84.deprecated.core.implicitly-nullable-parameter
- This feature is available since PHP 7.1, which is the lowest supported version in
PHP 8.5
- Run tests on PHP 8.5
- Fix deprecated use of
nullas array key- Not sure why
nullis used here as array key, but this doesn't change code behaviour - https://www.php.net/manual/en/migration85.deprecated.php#migration85.deprecated.core.using-null-as-an-array-offset
- Not sure why
- Fix deprecated use of Reflection
setAccessible()- The method is noop since PHP 8.1.0 and deprecated since 8.5.0
- This changes the code to call
setAccessible()only on PHP < 8.1.0, where it does something - https://www.php.net/manual/en/migration81.other-changes.php#migration81.other-changes.functions.reflection
- https://www.php.net/manual/en/migration85.deprecated.php#migration85.deprecated.reflection
Thank you for this contribution. I don't see any issues, and the PHP version check respects the established practice.
I hope Christian has time to merge and release it.