php-http / client-common

Common HTTP Client implementations and tools for HTTPlug
http://httplug.io
MIT License
1.01k stars 53 forks source link

Drop support for PHP < 7.4? #242

Open Chris53897 opened 7 months ago

Chris53897 commented 7 months ago

Combined usage for PHP 7.1, to 7.3 is at 4 Percent for Version 2. https://packagist.org/packages/php-http/client-common/php-stats#2

xabbuh commented 7 months ago

Would dropping support enable other things? For example, could the code be simplified because some code that is only present because of the support for PHP 7.3 could be removed?

dbu commented 7 months ago

yeah not much value in supporting it anymore. on the other hand, i usually only drop old versions when they hinder anything. if we would move to 8.0 or 8.1, we could modernize the code. i don't think dropping 7.1-7.3 allows to modernize anything.

if you want to work on it, i suggest we move to 8.1 directly (people on legacy php can keep using the legacy versions of this library. it is pretty stable, so no big hassle to maintain). and modernize the code where we can with new language features and strict types where possible without BC breaks.

eventually we could do a new major version with BC breaks, to have strict typing everywhere.

Chris53897 commented 7 months ago

Sounds good. I will work on this. I will set PHP 8.1 as minimum in that case.

dbu commented 7 months ago

thanks a lot! and as we just saw in #239 the legacy support does become cumbersome.

please for now no BC breaks, so that we can have a 2.x version with the cleanups and symfony 7 support.