Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP 8.4 implicitly nullable arguments deprecation. Remove support for PHP versions before 7.1. #95

Closed
wants to merge 2 commits into from

Conversation

artursreiljans
Copy link
Contributor

PHP 8.4 has deprecated implicitly nullable types (function foo(string $bar = null) {} instead of function 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.

@zanbaldwin
Copy link
Member

Thanks for this, I think I going to add create 6.0 for modern PHP, and keep 5.x for legacy support (like has been done for ip-doctrine). As there will be two supported versions active at the same time I'll have to figure out what the branches should look like, but once I do I'll merge this in :D

@zanbaldwin zanbaldwin deleted the branch darsyn:develop February 10, 2025 12:27
@zanbaldwin zanbaldwin closed this Feb 10, 2025
@zanbaldwin
Copy link
Member

Pull request closed automatically when I replaced develop/master branches with 5.x/6.x branches.
I'll try and cherry pick your commits into the new branches so you still get credit 👍

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