v2.9.0
版本发布时间: 2020-07-03 18:47:43
clue/reactphp-buzz最新发布版本:v2.9.0(2020-07-03 18:47:43)
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)