8000 Allow to use the HttpClientKernel independently from symfony/http-client · symfony/symfony@cbbc9ca · GitHub
[go: up one dir, main page]

Skip to content

Commit cbbc9ca

Browse files
committed
< 8000 div class="color-bg-default position-relative border rounded-2 color-border-default mt-2 d-flex flex-column pt-0">
Allow to use the HttpClientKernel independently from symfony/http-client
1 parent f308df9 commit cbbc9ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/HttpClientKernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final class HttpClientKernel implements HttpKernelInterface
3535

3636
public function __construct(HttpClientInterface $client = null)
3737
{
38-
if (!class_exists(HttpClient::class)) {
38+
if (null === $client && !class_exists(HttpClient::class)) {
3939
throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
4040
}
4141

0 commit comments

Comments
 (0)
0