Skip to content

Compatibility issue since version 1.14.0 #153

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

Closed
Jacycha opened this issue May 6, 2023 · 2 comments · Fixed by #154
Closed

Compatibility issue since version 1.14.0 #153

Jacycha opened this issue May 6, 2023 · 2 comments · Fixed by #154

Comments

@Jacycha
Copy link

Jacycha commented May 6, 2023

PHP 8.2.4

Description
Compatibility issue since version 1.14.0

PHP Fatal error:  Declaration of Http\Message\Encoding\FilteredStream::close() must be compatible with Psr\Http\Message\StreamInterface::close(): void in /var/www/html/vendor/php-http/message/src/Decorator/StreamDecorator.php on line 30

In StreamDecorator.php line 30:
                                                                                                                                        
  Declaration of Http\Message\Encoding\FilteredStream::close() must be compatible with Psr\Http\Message\StreamInterface::close(): void
@stefangr
Copy link

stefangr commented May 8, 2023

This is caused by

        "psr/http-message": "^1.0 || ^2.0"

Version ^1.0 of this package doesn't have type hints in the interfaces.
Version ^2.0 does and that requires the implementing classes to do the same.

Version 1.13 of this package had a requirement of:

        "psr/http-message": "^1.0"

so it's strange that the requirement was extended without updating the code.

@dbu
Copy link
Contributor

dbu commented May 8, 2023

dang, our CI had been tricked by other dependencies still restricting http-message to ^1.0, so we did not actually test the code with 2.0. i will try to adjust the code asap. looks like meanwhile the other dependencies no longer restrict http-message to ^1.0

meanwhile the hotfix is to restrict your application to psr/http-message: ^1.0 until we release a fix.

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 a pull request may close this issue.

3 participants