You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 4.4:
[travis] Fix build-packages script
Add types to constructors and private/final/internal methods (Batch III)
[HttpClient] Async HTTPlug client
[Messenger] Allow to configure the db index on Redis transport
[HttpClient] bugfix exploding values of headers
[VarDumper] Made all casters final
[VarDumper] Added a support for casting Ramsey/Uuid
Remove useless testCanCheckIfTerminalIsInteractive test case
[Validator] Add the missing translations for the Thai (\"th\") locale
[Routing] gracefully handle docref_root ini setting
[Validator] Fix ValidValidator group cascading usage
thrownew \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "php-http/httplug" package is not installed. Try running "composer require php-http/httplug".');
33
44
}
34
45
35
-
if (!interface_exists(ClientInterface::class)) {
36
-
thrownew \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "psr/http-client" package is not installed. Try running "composer require psr/http-client".');
37
-
}
38
-
39
46
if (!interface_exists(RequestFactory::class)) {
40
47
thrownew \LogicException('You cannot use "Symfony\Component\HttpClient\HttplugClient" as the "php-http/message-factory" package is not installed. Try running "composer require nyholm/psr7".');
41
48
}
42
49
43
50
/**
44
51
* An adapter to turn a Symfony HttpClientInterface into an Httplug client.
45
52
*
46
-
* Run "composer require psr/http-client" to install the base ClientInterface. Run
47
-
* "composer require nyholm/psr7" to install an efficient implementation of response
53
+
* Run "composer require nyholm/psr7" to install an efficient implementation of response
48
54
* and stream factories with flex-provided autowiring aliases.
if (null !== $this->responseFactory && null !== $this->streamFactory) {
74
+
return;
75
+
}
76
+
77
+
if (!class_exists(Psr17Factory::class)) {
78
+
thrownew \LogicException('You cannot use the "Symfony\Component\HttpClient\HttplugClient" as no PSR-17 factories have been provided. Try running "composer require nyholm/psr7".');
thrownew \LogicException(sprintf('You cannot use "%s()" as the "guzzlehttp/promises" package is not installed. Try running "composer require guzzlehttp/promises".', __METHOD__));
thrownew \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__));
208
+
} else {
209
+
$request = newRequest($method, $uri);
210
+
}
211
+
212
+
$request = $request
82
213
->withProtocolVersion($protocolVersion)
83
214
->withBody($this->createStream($body))
84
215
;
@@ -100,27 +231,84 @@ public function createStream($body = null): StreamInterface
if ($this->responseFactoryinstanceof UriFactoryInterface) {
258
+
return$this->responseFactory->createUri($uri);
259
+
}
260
+
261
+
if (!class_exists(Uri::class)) {
262
+
thrownew \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__));
0 commit comments