Compatibility issue since version 1.14.0
Jacycha opened this issue · 2 comments
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
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.
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.