diff --git a/src/guzzle/src/HandlerStackFactory.php b/src/guzzle/src/HandlerStackFactory.php index 847f5d972..385bc0f91 100644 --- a/src/guzzle/src/HandlerStackFactory.php +++ b/src/guzzle/src/HandlerStackFactory.php @@ -42,15 +42,9 @@ class HandlerStackFactory */ protected $usePoolHandler = false; - /** - * @var bool - */ - protected $useMake = false; - public function __construct() { if (class_exists(ApplicationContext::class)) { - $this->useMake = true; $this->usePoolHandler = class_exists(PoolFactory::class) && ApplicationContext::getContainer() instanceof Container; } } @@ -89,7 +83,7 @@ class HandlerStackFactory ]); } - if ($this->useMake) { + if (class_exists(ApplicationContext::class)) { return make(CoroutineHandler::class); } diff --git a/src/guzzle/tests/Stub/HandlerStackFactoryStub.php b/src/guzzle/tests/Stub/HandlerStackFactoryStub.php index aac868432..d94ea7120 100644 --- a/src/guzzle/tests/Stub/HandlerStackFactoryStub.php +++ b/src/guzzle/tests/Stub/HandlerStackFactoryStub.php @@ -19,6 +19,5 @@ class HandlerStackFactoryStub extends HandlerStackFactory public function __construct() { $this->usePoolHandler = false; - $this->useMake = true; } }