client-common icon indicating copy to clipboard operation
client-common copied to clipboard

Drop support for PHP < 7.4?

Open Chris53897 opened this issue 1 year ago • 4 comments

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

Chris53897 avatar Jan 21 '24 11:01 Chris53897

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?

xabbuh avatar Jan 22 '24 09:01 xabbuh

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.

dbu avatar Jan 22 '24 09:01 dbu

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

Chris53897 avatar Jan 22 '24 10:01 Chris53897

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.

dbu avatar Jan 22 '24 10:01 dbu