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

Compatability with php 8.4 #543

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

srjlewis
Copy link

Deprecate implicitly nullable parameter types
https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

@srjlewis
Copy link
Author

Hi

I have changed composer and git workflow to support PHP 7.1 and above, since nullable types cant be use in older versions of PHP.

@acelaya
Copy link
Contributor

acelaya commented Nov 4, 2024

PHP 8.4 will be released in a couple of weeks. Can we get this merged?

If dropping support PHP older than 7.1 is a problem, another possible approach is to simply remove the native typehint entirely, and document the types via PHPDoc.

@JayBizzle
Copy link
Owner

JayBizzle commented Nov 4, 2024

Trying to decide if i should release this as a v2.0 which i think we will have to do if we are dropping support for older PHP versions.

Old PHP version installs are negligible these days - https://packagist.org/packages/jaybizzle/crawler-detect/php-stats

Anyone got any thoughts on this?

@acelaya
Copy link
Contributor

acelaya commented Nov 4, 2024

Bumping dependency requirements is usually not considered a breaking change. If v1.3 was to be released requiring PHP 7.1, anyone depending on ^1.0 and using an older PHP version, would still get 1.2.x and everything would continue working for them (assuming they use composer, but in almost 2025, I don't think anything else needs to be even considered).

On the other hand, if you want to continue providing patches for older PHP versions, bumping the major to 2 will ease your work in backporting patches between versions.

So it depends on what you want to do and promote.

As a fellow open source maintainer, I would recommend you make your life easier and simply drop support for older versions. PHP 7.1 is 8 years old, people have had time to update.

As a consumer of this library, I don't have an opinion. Both options work for me and will be as easy to update.

@JayBizzle
Copy link
Owner

Thanks for your inout @acelaya

I think we will go down the v1.3 route 👍

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.

3 participants