Skip to content

Allow use of PSR-7 v2 #545

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

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from
Open

Allow use of PSR-7 v2 #545

wants to merge 2 commits into from

Conversation

Crell
Copy link

@Crell Crell commented May 28, 2025

PSR-7 v2 just adds types, which should be safe in virtually any circumstances. It does require PHP 7.2 or higher, but allowing either version should allow Composer to figure it out.

Without this, having React installed makes a project incompatible with any package that depends on PSR-7 v2, which is a non-small number.

(I haven't tried running this locally yet; I am assuming CI will indicate if there's an issue.)

@Crell
Copy link
Author

Crell commented May 28, 2025

... A segfault? I am confused.

@WyriHaximus
Copy link
Member

... A segfault? I am confused.

It's a bit of a long story: friends-of-reactphp/mysql#205

@WyriHaximus
Copy link
Member

Just merged #543 that will resolve the segfault

@Crell
Copy link
Author

Crell commented May 29, 2025

Oh, that thing...

@Crell
Copy link
Author

Crell commented May 29, 2025

Hm, it's still locking psr/http-message 1.1, even on newer PHP versions that would support 2.0. I'm not sure why.

@Bilge
Copy link

Bilge commented May 30, 2025

composer why-not psr/http-message ^2

@Crell
Copy link
Author

Crell commented Jun 4, 2025

ringcentral/psr7 1.3.0 requires psr/http-message (~1.0)

Well [expletive deleted]. That package appears to be abandoned. I don't know if switching to nyholm/psr7 (which is supported and solid) is viable, but this sounds like a larger problem.

@kwhat
Copy link

kwhat commented Jun 10, 2025

@Crell I've added the required changes for psr/http-message ^2.0 to PR #542, however, I solved the ringcentral/psr7 problem by removing clue/http-proxy-react from the dependencies as it is only used in 1 example. Have you tried contacting clue/http-proxy-react to see if they would be open to moving to nyholm/psr7 or similar? It would be nice if we could keep the example.

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.

4 participants