Skip to content

Commit

Permalink
Prepare v2.9.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Jul 3, 2020
1 parent ef86fa4 commit eb180b5
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 1 deletion.
79 changes: 79 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,84 @@
# Changelog

## 2.9.0 (2020-07-03)

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()` and `requestStreaming()` methods and
deprecate `send()` method and `streaming` option.
(#170 by @clue)

```php
// 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)

```php
// 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)

```php
// new: download maximum of 100 MB
$browser->withResponseBuffer(100 * 1000000)->get($url);
```

* Feature: Improve `withBase()` method and deprecate `withoutBase()` method
(#173 by @clue)

```php
// old: deprecated
$browser = $browser->withoutBase();

// new
$browser = $browser->withBase(null);
```

* Deprecate `submit()` method, use `post()` instead.
(#171 by @clue)

```php
// 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)

## 2.8.2 (2020-06-02)

* Fix: HTTP `HEAD` requests should not expect a response body.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ This project follows [SemVer](https://semver.org/).
This will install the latest supported version:

```bash
$ composer require clue/buzz-react:^2.8.2
$ composer require clue/buzz-react:^2.9
```

See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
Expand Down

0 comments on commit eb180b5

Please sign in to comment.