update patch 1
This commit is contained in:
@@ -26,14 +26,15 @@ abstract class AbstractHttpTransport extends AbstractTransport
|
||||
{
|
||||
protected ?string $host = null;
|
||||
protected ?int $port = null;
|
||||
protected ?HttpClientInterface $client;
|
||||
|
||||
public function __construct(?HttpClientInterface $client = null, ?EventDispatcherInterface $dispatcher = null, ?LoggerInterface $logger = null)
|
||||
{
|
||||
$this->client = $client;
|
||||
public function __construct(
|
||||
protected ?HttpClientInterface $client = null,
|
||||
?EventDispatcherInterface $dispatcher = null,
|
||||
?LoggerInterface $logger = null,
|
||||
) {
|
||||
if (null === $client) {
|
||||
if (!class_exists(HttpClient::class)) {
|
||||
throw new \LogicException(sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
|
||||
throw new \LogicException(\sprintf('You cannot use "%s" as the HttpClient component is not installed. Try running "composer require symfony/http-client".', __CLASS__));
|
||||
}
|
||||
|
||||
$this->client = HttpClient::create();
|
||||
|
||||
Reference in New Issue
Block a user