Releases: clue/reactphp-buzz
v2.9.0
A major feature release adding a new options APIs and more consistent APIs
for sending streaming requests. Includes a major documentation overhaul and
deprecates a number of APIs.
-
Feature: Add new
request()
andrequestStreaming()
methods and
deprecatesend()
method andstreaming
option.
(#170 by @clue)// old: deprecated $browser->withOptions(['streaming' => true])->get($url); $browser->send(new Request('OPTIONS', $url)); // new $browser->requestStreaming('GET', $url); $browser->request('OPTIONS', $url);
-
Feature: Add dedicated methods to control options, deprecate
withOptions()
.
(#172 by @clue)// old: deprecated $browser->withOptions(['timeout' => 10]); $browser->withOptions(['followRedirects' => false]); $browser->withOptions(['obeySuccessCode' => false]); // new $browser->withTimeout(10); $browser->withFollowRedirects(false); $browser->withRejectErrorResponse(false);
-
Feature: Add
withResponseBuffer()
method to limit maximum response buffer size (defaults to 16 MiB).
(#175 by @clue)// new: download maximum of 100 MB $browser->withResponseBuffer(100 * 1000000)->get($url);
-
Feature: Improve
withBase()
method and deprecatewithoutBase()
method
(#173 by @clue)// old: deprecated $browser = $browser->withoutBase(); // new $browser = $browser->withBase(null);
-
Deprecate
submit()
method, usepost()
instead.
(#171 by @clue)// old: deprecated $browser->submit($url, $data); // new $browser->post($url, ['Content-Type' => 'application/x-www-form-urlencoded'], http_build_query($data));
-
Deprecate
UriInterface
for request methods, use URL strings instead.
(#174 by @clue) -
Fix: Fix unneeded timeout timer when request body closes and sender already rejected.
(#169 by @clue) -
Improve documentation structure, add documentation for all API methods and
handling concurrency.
(#167 and #176 by @clue) -
Improve test suite to use ReactPHP-based webserver instead of httpbin and
add forward compatibility with PHPUnit 9.
(#168 by @clue)
v2.8.2
v2.8.1
v2.8.0
-
Feature: Use HTTP/1.1 protocol version by default and add new
Browser::withProtocolVersion()
.
(#162 by @clue)This is the preferred HTTP protocol version which also provides decent
backwards-compatibility with legacy HTTP/1.0 servers. As such, there should
rarely be a need to explicitly change this protocol version. You can revert
to legacy HTTP/1.0 like this:$browser->withProtocolVersion('1.0')->get($url)->then(…);
-
Feature / Fix: Explicitly close connection after response body ends.
(#161 by @clue)This improves support for servers ignoring the
Connection: close
request
header that would otherwise keep the connection open and could eventually
run into a timeout even though the transfer was completed. -
Clean up test suite and add
.gitattributes
to exclude dev files from exports.
(#163 by @SimonFrings)
v2.7.0
-
Feature: Add backpressure support and support throttling for streaming outgoing chunked request body.
(#148 by @clue) -
Feature: Start sending outgoing request even when streaming body doesn't emit any data yet.
(#150 by @clue) -
Feature: Only start request timeout timer after streaming request body has been sent (exclude upload time).
(#151 and #152 by @clue) -
Feature: Reject request when streaming request body emits error or closes unexpectedly.
(#153 by @clue) -
Improve download benchmarking script and add new upload benchmark.
(#149 by @clue)
v2.6.1
v2.6.0
-
Feature / Fix: Add
Content-Length: 0
request header for emptyPOST
request etc.
(#120 by @clue) -
Fix: Only try to follow redirects if
Location
response header is present.
(#130 by @clue) -
Documentation and example for SSH proxy (SSH tunnel) and update SOCKS proxy example.
(#116, #119 and #121 by @clue) -
Improve test suite and also run tests on PHP 7.3.
(#122 by @samnela)
v2.5.0
-
Feature: Add HTTP timeout option.
(#114 by @Rakdar and @clue)This now respects PHP's
default_socket_timeout
setting (default 60s) as a
timeout for sending the outgoing HTTP request and waiting for a successful
response and will otherwise cancel the pending request and reject its value
with an Exception. You can now use thetimeout
option to
pass a custom timeout value in seconds like this:$browser = $browser->withOptions(array( 'timeout' => 10.0 )); $browser->get($uri)->then(function (ResponseInterface $response) { // response received within 10 seconds maximum var_dump($response->getHeaders()); });
Similarly, you can use a negative timeout value to not apply a timeout at
all or use anull
value to restore the default handling. -
Improve documentation for
withOptions()
and
add documentation and example for HTTP CONNECT proxy.
(#111 and #115 by @clue) -
Refactor
Browser
to reuse singleTransaction
instance internally
which now accepts sending individual requests and their options.
(#113 by @clue)
v2.4.0
-
Feature / Fix: Support cancellation forwarding and cancelling redirected requests.
(#110 by @clue) -
Feature / Fix: Remove
Authorization
request header for redirected cross-origin requests
and add documentation for HTTP redirects.
(#108 by @clue) -
Improve API documentation and add documentation for HTTP authentication and
Authorization
header.
(#104 and #109 by @clue)
v2.3.0
-
Feature / Fix: Pass custom request headers when following redirects
(#91 by @seregazhuk and #96 by @clue) -
Support legacy PHP 5.3 through PHP 7.2 and HHVM
(#95 by @clue) -
Improve documentation
(#87 by @holtkamp and #93 by @seregazhuk) -
Improve test suite by adding forward compatibility with PHPUnit 5, PHPUnit 6
and PHPUnit 7 and explicitly test HTTP/1.1 protocol version.
(#86 by @carusogabriel and #94 and #97 by @clue)