Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

PSR 7 http-message version requirement #3296

Closed
rotexdegba opened this issue Nov 9, 2023 · 4 comments · Fixed by #3302
Closed

PSR 7 http-message version requirement #3296

rotexdegba opened this issue Nov 9, 2023 · 4 comments · Fixed by #3302
Milestone

Comments

@rotexdegba
Copy link

I noticed that version 1.1 of psr/http-message is what has been required in the composer.json (

"psr/http-message": "^1.1",
) for Slim 4.

Is it possible to have "^1.1 || ^2.0" as the requirement instead?

Version 2.0 ( php-fig/http-message@1.1...2.0 ) of psr/http-message has explicit return type typing which is better. Both versions 1.1 & 2.0 of psr/http-message require PHP 7.2 or 8.0.

@BelleNottelling
Copy link

Temporarily you can do this to get it working with 2.0. I'm using the nyholm PSR7 packages and there aren't any issues with this.

"psr/http-message": "2.0 as 1.1"

Regardless, it would definitely be ideal to no longer need to implement a workaround

@l0gicgate l0gicgate added this to the 4.13.0 milestone Dec 12, 2023
@l0gicgate
Copy link
Member

Feel free to raise a PR for this

@rotexdegba
Copy link
Author

Feel free to raise a PR for this

See #3302

@andreas-aeschlimann
Copy link

I just updated Slim PHP which included this PR (#3302). I had several issues due to the added return types, so I would consider this a breaking change. Maybe this should be noted in the Changelogs?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants