Skip to content

Commit 714fc56

Browse files
authored
Prepare for beta 1 (#350)
* Prepare for beta 1 * Added better exception messages
1 parent 8e4ca27 commit 714fc56

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The change log shows what have been Added, Changed, Deprecated and Removed betwe
1212

1313
- It is now mandatory to pass a client to the `Browser`'s constructor.
1414
- First argument of `Curl`, `MultiCurl` and `FileGetContent` clients should be the response factory.
15+
- Using stable version of `psr/http-client`.
1516

1617
## 0.17.2
1718

Diff for: lib/Browser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Browser implements BuzzClientInterface
4040
public function __construct(BuzzClientInterface $client, $requestFactory)
4141
{
4242
if (!$requestFactory instanceof RequestFactoryInterface && !$requestFactory instanceof RequestFactory) {
43-
throw new InvalidArgumentException('$requestFactory not a valid RequestFactory');
43+
throw new InvalidArgumentException(sprintf('Second argument of %s must be an instance of %s or %s.', __CLASS__, RequestFactoryInterface::class, RequestFactory::class));
4444
}
4545

4646
$this->client = $client;

Diff for: lib/Client/AbstractClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class AbstractClient
3333
public function __construct($responseFactory, array $options = [])
3434
{
3535
if (!$responseFactory instanceof ResponseFactoryInterface && !$responseFactory instanceof ResponseFactory) {
36-
throw new InvalidArgumentException('$responseFactory not a valid ResponseFactory');
36+
throw new InvalidArgumentException(sprintf('First argument of %s must be an instance of %s or %s.', __CLASS__, ResponseFactoryInterface::class, ResponseFactory::class));
3737
}
3838

3939
$this->options = new ParameterBag();

0 commit comments

Comments
 (0)