amphp / http-client

An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.
https://amphp.org/http-client
MIT License
701 stars 67 forks source link

4.x's php version depends changed because of league/uri #344

Closed xpader closed 1 year ago

xpader commented 1 year ago

amphp/http-client depends on league/uri:^6, but league/uri from version 6.0 to 6.8 changed required php version depends from 7.2 up to 8.1 now. This break amphp 2.x and http-client 4.x minimal php version >=7.2 required. I think amphp/http-client should required league/uri as league/uri:~6.4.0 to solve this problem.

kelunik commented 1 year ago

I think amphp/http-client should required league/uri as league/uri:~6.4.0 to solve this problem.

Composer will automatically use the older version if you use older versions of PHP, so newer versions requiring a newer version of PHP isn't a problem.

If you generate a composer.lock file on a newer version of PHP and then use that to deploy to older versions, that's a problem on your end. Either use the same version locally and on production or configure Composer with a specific platform version: https://stackoverflow.com/a/54736948/2373138

xpader commented 1 year ago

I think amphp/http-client should required league/uri as league/uri:~6.4.0 to solve this problem.

Composer will automatically use the older version if you use older versions of PHP, so newer versions requiring a newer version of PHP isn't a problem.

Thanks, I think I know what's going on here, I update some pack with --ignore-platform-reqs, so some package depends on newest PHP version is also upgraded.