-
Notifications
You must be signed in to change notification settings - Fork 201
Deprecated GuzzleHttp\Psr7 function API seems to be used and it doesn't work anymore #299
Comments
This happens if guzzlehttp/guzzle 7.0 is used and guzzlehttp/psr7 is upgraded to 2.0, because function API is removed in that version. Static API has been introduced in guzzlehttp/psr7 1.7.0. |
Hi, When do you will update the code to be able to use new version of guzzlehttp/psr-7 ? Thanks |
Or can you update your composer.json to use the good versions of Guzzle ? |
Registering our interest in this issue too, we're currently experiencing the same issue. |
Same problem here. +1 |
Same problem here, after composer update: Error message: Work around: |
it is fixed here: #302 |
@galvani I'm sorry but it isn't fixed yet. Just today, I ran the composer update and I got this issue. |
Not fixed, still ongoing on our client's project. |
@mfpx @neoacevedo The fix has not been released yet. In fact, there was no release since December 2020, check the Releases page. You can "Watch" the repository to be informed about new releases (and you can select Releases only under Custom). |
@spaze @katmsft we're utilizing this library as part of the Microsoft Azure Storage for WordPress plugin (see source) and are currently blocked by getting this issue closed via a release for the already merged PR #302. Any ETA you can provide for an upcoming release will help us plan our downstream communications to users within the WordPress ecosystem. Many thanks! |
Which service(blob, file, queue, table) does this issue concern?
Any one of them using Guzzle\Psr7. Issue experienced with for example blob service.
Which version of the SDK was used?
"microsoft/azure-storage-blob": 1.5.2
What's the PHP/OS version?
PHP 7.3.28
Debian Buster
What problem was encountered?
For example:
Error: Call to undefined function GuzzleHttp\\Psr7\\stream_for() in /microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php:1837
It seems azure-storage-php is still using a function API for Guzzle PSR-7, but that has been removed and replaced with static API.
The code on that line, which doesn't work:
$body = Psr7\stream_for($content);
Using this works:
$body = Utils::streamFor($content);
(after importing GuzzleHttp\Psr7\Utils;)
Have you found a mitigation/solution?
Not backwards compatible solution: Migrate to static API by using a migration table found here: Guzzle PSR-7 Upgrading from Function API
The text was updated successfully, but these errors were encountered: