amphp / socket

Non-blocking socket and TLS functionality for PHP based on Amp.
https://amphp.org/socket
MIT License
237 stars 38 forks source link

Migration from league/uri-parser to league/uri-interfaces (abandoned package) #117

Open Ineod opened 4 days ago

Ineod commented 4 days ago

Hello,

First of all, thank you for your hard work on amphp/socket and the broader Amp ecosystem. These libraries are fantastic tools for asynchronous programming in PHP.

I would like to bring to your attention an issue regarding one of the dependencies used in this project: league/uri-parser. This package has been marked as abandoned by its maintainers, and Composer now recommends replacing it with league/uri-interfaces. Below is the warning I receive during installation or when auditing dependencies:

Package league/uri-parser is abandoned, you should avoid using it. Use league/uri-interfaces instead.

Additionally, while attempting to upgrade to amphp/socket 2.x (as suggested to address this issue), I encountered a conflict with amphp/http-client. The current version of amphp/http-client (v4.4.0) depends on amphp/socket ^1, which prevents upgrading to amphp/socket 2.0.

Here are the specific Composer error messages I received:

Problem 1
  - Root composer.json requires amphp/socket 2.0, found amphp/socket[v2.0.0] but these were not loaded, likely because it conflicts with another require.
Problem 2
  - amphp/http-client v4.4.0 requires amphp/socket ^1 -> found amphp/socket[v1.0.0, ..., v1.2.1] but it conflicts with your root composer.json require (2.0).

This creates a dependency conflict that makes it impossible to both migrate away from league/uri-parser and maintain compatibility with amphp/http-client.

Would it be possible to update amphp/http-client to be compatible with amphp/socket 2.x? Alternatively, if there is a workaround for this situation, I would greatly appreciate any guidance.

Thank you again for your efforts and for maintaining these great libraries. Please let me know if I can assist with testing or validating a potential solution.

Best regards,

Ineodev

kelunik commented 3 days ago

Socket v2 depends on Amp v3, which is based on Fibers instead of Generators. You'll also have to update to amphp/http-client v5.

I don't think it's worth the time fixing this in the old v1 version.