Skip to content

Commit

Permalink
Prepare for beta 1 (#350)
Browse files Browse the repository at this point in the history
* Prepare for beta 1

* Added better exception messages
  • Loading branch information
Nyholm committed Nov 1, 2018
1 parent 8e4ca27 commit 714fc56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/Browser.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Client/AbstractClient.php
Expand Up @@ -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();
Expand Down

0 comments on commit 714fc56

Please sign in to comment.