Fix PHP 8.4 implicitly nullable arguments deprecation. Remove support for PHP versions before 7.1. #95
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.
PHP 8.4 has deprecated implicitly nullable types (
function foo(string $bar = null) {}
instead offunction foo(?string $bar = null) {}
). This pull request addresses that.However, explicitly nullable types were only introduced in PHP 7.1 (https://www.php.net/manual/en/migration71.new-features.php). Thus, this same pull request drops support for versions 5.6 and 7.0.
According to the latest Packagist statistics, their usage is below 1% in 2025 (https://stitcher.io/blog/php-version-stats-january-2025) – and in fact, has already been since at least late 2021 (https://stitcher.io/blog/php-version-stats-january-2022).
I suggest dropping the support for ancient versions and paving the way to 9.0 which is likely to convert current deprecation notices into plain hard fatal errors.