Azure / azure-storage-php

Microsoft Azure Storage Library for PHP
MIT License
217 stars 198 forks source link

Call to undefined function GuzzleHttp\Psr7\build_query() #308

Open vdiddlodka opened 3 years ago

vdiddlodka commented 3 years ago

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the SDK was used?

azure-storage-blob:1.5.2

What's the PHP/OS version?

PHP Version 7.3.26/Windows

What problem was encountered?

When calling BlobRestProxy::createBlobService($connectionString); the following error is thrown; Call to undefined function GuzzleHttp\Psr7\build_query(). This appears to be related to the the updates made in guzzlehttp/psr7 as per their documentation;

The static API was first introduced in 1.7.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API was removed in 2.0.0. A migration table has been provided here for your convenience:

Original Function | Replacement Method -- | -- str | Message::toString uri_for | Utils::uriFor stream_for | Utils::streamFor parse_header | Header::parse normalize_header | Header::normalize modify_request | Utils::modifyRequest rewind_body | Message::rewindBody try_fopen | Utils::tryFopen copy_to_string | Utils::copyToString copy_to_stream | Utils::copyToStream hash | Utils::hash readline | Utils::readLine parse_request | Message::parseRequest parse_response | Message::parseResponse parse_query | Query::parse build_query | Query::build mimetype_from_filename | MimeType::fromFilename mimetype_from_extension | MimeType::fromExtension _parse_message | Message::parseMessage _parse_request_uri | Message::parseRequestUri get_message_body_summary | Message::bodySummary _caseless_remove | Utils::caselessRemove


Steps to reproduce the issue?

Use the aforementioned versions and execute BlobRestProxy::createBlobService($connectionString).

Have you found a mitigation/solution?

Yes, force older version with composer; composer require guzzlehttp/psr7:1.8.2

Is there a failing request ID related to this problem returned by server? What is it?

NA

What is the storage account name and time frame of your last reproduce? (UTC YYYY/MM/DD hh:mm:ss)

NA

(If you think some of the information should not be shared publicly, you can e-mail the main Microsoft contributors of the repository instead.)

spaze commented 3 years ago

FYI, this is a duplicate of #299