Skip to content

Allow psr/http-message 2#56

Merged
Nyholm merged 1 commit intoNyholm:masterfrom
derrabus:bump/psr-http-message-2
Nov 8, 2023
Merged

Allow psr/http-message 2#56
Nyholm merged 1 commit intoNyholm:masterfrom
derrabus:bump/psr-http-message-2

Conversation

@derrabus
Copy link
Copy Markdown
Contributor

No description provided.

This was referenced May 1, 2023
@aimeos
Copy link
Copy Markdown

aimeos commented Jun 14, 2023

@Nyholm When will this PR merged an a new version tagged? At the moment, all composer installations break if psr/http-message:2.0 is required

@Nyholm Nyholm merged commit 4335801 into Nyholm:master Nov 8, 2023
@Nyholm
Copy link
Copy Markdown
Owner

Nyholm commented Nov 8, 2023

Hey. Of course. Sorry for the delay

@derrabus derrabus deleted the bump/psr-http-message-2 branch November 8, 2023 09:33
@mvorisek
Copy link
Copy Markdown

mvorisek commented Nov 9, 2023

This has broken our stable releases wit PHP 7.4 as we require this package only:
https://github.com/atk4/ui/blob/5.0.0/composer.json#L56
and not "psr/http-message": "^1.0" explicitly.

Issue:

Fatal error: Declaration of class@anonymous::__toString() must be compatible
with Psr\Http\Message\StreamInterface::__toString(): string

I wonder if this is intended BC break and if this release should be untagged and released under v2.0.

@Nyholm
Copy link
Copy Markdown
Owner

Nyholm commented Nov 9, 2023

Hey.

Thank you for the report. psr/http-message: 2 says it supports php 7.2.
Where is this anonymous class used? Is it your code or a library?

@mvorisek
Copy link
Copy Markdown

mvorisek commented Nov 9, 2023

in our codebase - but it is BC break when "psr/http-message": "^1.0" is not required explicitly in user projects/libs

@Nyholm
Copy link
Copy Markdown
Owner

Nyholm commented Nov 9, 2023

Yeah.
It seams like you have been using a dependency (psr/http-message), but not specified it in your composer.json. That is super easy to do, but it is dangerous because of situations like this.

I appreciate you reporting this and explaining how to fix it. That will probably help the next person in the same situation.

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