diff --git a/CHANGELOG.md b/CHANGELOG.md index bbcb37ca..36f00765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ The change log shows what have been Added, Changed, Deprecated and Removed betwe - It is now mandatory to pass a client to the `Browser`'s constructor. - First argument of `Curl`, `MultiCurl` and `FileGetContent` clients should be the response factory. +- Using stable version of `psr/http-client`. ## 0.17.2 diff --git a/lib/Browser.php b/lib/Browser.php index 825b8043..f754c359 100644 --- a/lib/Browser.php +++ b/lib/Browser.php @@ -40,7 +40,7 @@ class Browser implements BuzzClientInterface public function __construct(BuzzClientInterface $client, $requestFactory) { if (!$requestFactory instanceof RequestFactoryInterface && !$requestFactory instanceof RequestFactory) { - throw new InvalidArgumentException('$requestFactory not a valid RequestFactory'); + throw new InvalidArgumentException(sprintf('Second argument of %s must be an instance of %s or %s.', __CLASS__, RequestFactoryInterface::class, RequestFactory::class)); } $this->client = $client; diff --git a/lib/Client/AbstractClient.php b/lib/Client/AbstractClient.php index 0c0be552..3eb14ec7 100644 --- a/lib/Client/AbstractClient.php +++ b/lib/Client/AbstractClient.php @@ -33,7 +33,7 @@ abstract class AbstractClient public function __construct($responseFactory, array $options = []) { if (!$responseFactory instanceof ResponseFactoryInterface && !$responseFactory instanceof ResponseFactory) { - throw new InvalidArgumentException('$responseFactory not a valid ResponseFactory'); + throw new InvalidArgumentException(sprintf('First argument of %s must be an instance of %s or %s.', __CLASS__, ResponseFactoryInterface::class, ResponseFactory::class)); } $this->options = new ParameterBag();