Closed
Description
PHP version: 7.4.7
Description
Cannot find Guzzle 7.0.1, even though the package provides a psr18 implementation (https://github.com/guzzle/guzzle/blob/7.0.1/composer.json#L38).
How to reproduce
composer show
:
guzzlehttp/guzzle 7.0.1 Guzzle is a PHP HTTP client library
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.6.1 PSR-7 message implementation tha...
php-http/cache-plugin 1.7.0 PSR-6 Cache plugin for HTTPlug
php-http/client-common 2.1.0 Common HTTP Client implementatio...
php-http/discovery 1.8.0 Finds installed HTTPlug implemen...
php-http/httplug 2.1.0 HTTPlug, the HTTP client abstrac...
php-http/message 1.8.0 HTTP Message related tools
php-http/message-factory v1.0.2 Factory interfaces for PSR-7 HTT...
php-http/multipart-stream-builder 1.1.0 A builder class that help you cr...
php-http/promise v1.0.0 Promise used for asynchronous HT...
Example code:
Psr18ClientDiscovery::find();
Error:
Http\Discovery\Exception\NotFoundException: No PSR-18 clients found. Make sure to install a package providing "psr/http-client-implementation". Example: "php-http/guzzle6-adapter".
/data/vendor/php-http/discovery/src/Psr18ClientDiscovery.php:27
/data/src/HttpClient/Builder.php:108
/data/src/Client.php:79
/data/tests/ClientTest.php:29
Caused by
Http\Discovery\Exception\DiscoveryFailedException: Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors
- Puli Factory is not available
- No valid candidate found using strategy "Http\Discovery\Strategy\CommonClassesStrategy". We tested the following candidates: Http\Discovery\Strategy\CommonClassesStrategy::symfonyPsr18Instantiate, Http\Discovery\Strategy\CommonClassesStrategy::buzzInstantiate.
- No valid candidate found using strategy "Http\Discovery\Strategy\CommonPsr17ClassesStrategy". We tested the following candidates: .
/data/vendor/php-http/discovery/src/Exception/DiscoveryFailedException.php:41
/data/vendor/php-http/discovery/src/ClassDiscovery.php:79
/data/vendor/php-http/discovery/src/Psr18ClientDiscovery.php:25
Metadata
Metadata
Assignees
Labels
No labels