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

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Compatability with php 8.4 #543

merged 2 commits into from
Nov 25, 2024

Conversation

srjlewis
Copy link
Contributor

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

@srjlewis
Copy link
Contributor 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 👍

@acelaya
Copy link
Contributor

acelaya commented Nov 17, 2024

Is there anything else that is preventing this to be merged?

@JayBizzle
Copy link
Owner

Is there anything else that is preventing this to be merged?

Just time. Ill try and get it sorted this week 🙏

@acelaya
Copy link
Contributor

acelaya commented Nov 24, 2024

In case anyone else is still a bit blocked by this, I have just published a fork which includes these changes: acelaya/crawler-detect.

I have not marked it as a replacement of jaybizzle/crawler-detect, as I plan to mark it as abandoned as this is merged and released here.

@JayBizzle JayBizzle merged commit be155e1 into JayBizzle:master Nov 25, 2024
9 checks passed
@JayBizzle
Copy link
Owner

JayBizzle commented Nov 25, 2024

Finally released v1.3.0

Sorry for the delay.

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