diff --git a/CHANGELOG.md b/CHANGELOG.md index c42d9c1..ea10080 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ - Add a flexible http client providing both contract, and only emulating what's necessary - HTTP Client Router: route requests to underlying clients +### Deprecated + +- Extending client classes, they will be made final in version 2.0 + ## 1.0.0 - 2016-01-27 diff --git a/spec/FlexibleHttpClientSpec.php b/spec/FlexibleHttpClientSpec.php index 3396572..0df9e1e 100644 --- a/spec/FlexibleHttpClientSpec.php +++ b/spec/FlexibleHttpClientSpec.php @@ -2,16 +2,12 @@ namespace spec\Http\Client\Common; -use Http\Client\Common\HttpAsyncClientDecorator; -use Http\Client\Common\HttpClientDecorator; -use Http\Client\Common\FlexibleHttpClient; use Http\Client\HttpAsyncClient; use Http\Client\HttpClient; use Http\Promise\Promise; use Psr\Http\Message\RequestInterface; use Psr\Http\Message\ResponseInterface; use PhpSpec\ObjectBehavior; -use Prophecy\Prophet; class FlexibleHttpClientSpec extends ObjectBehavior { @@ -79,8 +75,10 @@ function it_emulates_a_client( $this->sendRequest($syncRequest)->shouldReturn($syncResponse); } - function it_does_not_emulate_a_client(FlexibleHttpClient $client, RequestInterface $syncRequest, RequestInterface $asyncRequest) + function it_does_not_emulate_a_client($client, RequestInterface $syncRequest, RequestInterface $asyncRequest) { + $client->implement('Http\Client\HttpClient'); + $client->implement('Http\Client\HttpAsyncClient'); $client->sendRequest($syncRequest)->shouldBeCalled(); $client->sendRequest($asyncRequest)->shouldNotBeCalled(); $client->sendAsyncRequest($asyncRequest)->shouldBeCalled(); diff --git a/src/FlexibleHttpClient.php b/src/FlexibleHttpClient.php index 1fdad7f..58f8813 100644 --- a/src/FlexibleHttpClient.php +++ b/src/FlexibleHttpClient.php @@ -11,7 +11,7 @@ * * @author Joel Wurtz */ -class FlexibleHttpClient implements HttpClient, HttpAsyncClient +final class FlexibleHttpClient implements HttpClient, HttpAsyncClient { use HttpClientDecorator; use HttpAsyncClientDecorator;