v0.5.0
Pre-release
Pre-release
-
Feature / BC break: Implement PSR-7 http-message interfaces
(#54 by @clue)Replace custom
Message
,Request
,Response
andUri
classes with
common PSR-7 interfaces:// old $browser->get($uri)->then(function (Response $response) { echo 'Test: ' . $response->getHeader('X-Test'); echo 'Body: ' . $response->getBody(); }); // new $browser->get($uri)->then(function (ResponseInterface $response) { if ($response->hasHeader('X-Test')) { echo 'Test: ' . $response->getHeaderLine('X-Test'); } echo 'Body: ' . $response->getBody(); });
-
Feature: Add streaming API
(#56 by @clue)$browser = $browser->withOptions(array('streaming' => true)); $browser->get($uri)->then(function (ResponseInterface $response) { $response->getBody()->on('data', function($chunk) { echo $chunk . PHP_EOL; }); });
-
Remove / BC break: Remove
Browser::resolve()
because it's now fully decoupled
(#55 by @clue)If you need this feature, consider explicitly depending on rize/uri-template
instead:$ composer require rize/uri-template
-
Use clue/block-react and new Promise API in order to simplify tests
(#53 by @clue)