Bug #94454
closed
SelfEmittableLazyOpenStream is not compatible with guzzlehttp/psr7 2.0.0
Added by Christian Heindl over 3 years ago.
Updated over 3 years ago.
Description
With new 2.0.0 version of guzzlehttp/psr7 TYPO3 11.2 does not startup, due to an exception:
Fatal error: Class TYPO3\CMS\Core\Http\SelfEmittableLazyOpenStream may not inherit from final class (GuzzleHttp\Psr7\LazyOpenStream) in /app/public/typo3/sysext/core/Classes/Http/SelfEmittableLazyOpenStream.php on line 29
GuzzleHttp\Psr7\LazyOpenStream is now a final class an cannot be subclasses anymore.
The occurred to me today after i executed "composer update" within a TYPO3 11 project.
- Related to Bug #94422: wrong handling in TYPO3\CMS\Core\Http\SelfEmittableLazyOpenStream added
Yes, this should fix the issue! As a workaround I pinned guzzlehttp/psr7 to ^1.8.0 in my project´s composer.json and it worked again. Thank you!
I think we should create our SelfEmittableLazyOpenStream as a wrapper / decorator around the Guzzle API.
Thank for feedback, Christian.
Unsure, Benni. Not sure if we really want that dependency. Imho, an own implementation wouldn't hurt in this case, all other psr-7 implementations in ext:core have no 3rd party dependency, too. But we have time now and can decide on a good solution later.
- Status changed from New to Accepted
- Priority changed from Should have to Must have
@Benni Mack, actually it was like that and that was the reason for the broken behavior. Instead the Guzzle Api 2.x expects being the final wrapper.
Apart from the breaking "final" I consider the API as stable, so using Guzzle Api like required can IMO seen as relatively future-proof.
- Status changed from Accepted to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
- Related to Bug #95136: Required guzzlehttp/psr7 too new for most libraries added
Also available in: Atom
PDF