Skip to content

Commit 758a731

Browse files
committed
Prepare v2.5.0 release
1 parent 9f54c5b commit 758a731

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## 2.5.0 (2018-10-24)
4+
5+
* Feature: Add HTTP timeout option.
6+
(#114 by @Rakdar and @clue)
7+
8+
This now respects PHP's `default_socket_timeout` setting (default 60s) as a
9+
timeout for sending the outgoing HTTP request and waiting for a successful
10+
response and will otherwise cancel the pending request and reject its value
11+
with an Exception. You can now use the [`timeout` option](#withoptions) to
12+
pass a custom timeout value in seconds like this:
13+
14+
```php
15+
$browser = $browser->withOptions(array(
16+
'timeout' => 10.0
17+
));
18+
19+
$browser->get($uri)->then(function (ResponseInterface $response) {
20+
// response received within 10 seconds maximum
21+
var_dump($response->getHeaders());
22+
});
23+
```
24+
25+
Similarly, you can use a negative timeout value to not apply a timeout at
26+
all or use a `null` value to restore the default handling.
27+
28+
* Improve documentation for `withOptions()` and
29+
add documentation and example for HTTP CONNECT proxy.
30+
(#111 and #115 by @clue)
31+
32+
* Refactor `Browser` to reuse single `Transaction` instance internally
33+
which now accepts sending individual requests and their options.
34+
(#113 by @clue)
35+
336
## 2.4.0 (2018-10-02)
437

538
* Feature / Fix: Support cancellation forwarding and cancelling redirected requests.

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@ mess with most of the low-level details.
2020
Send any number of HTTP requests to any number of HTTP servers in parallel and
2121
process their responses as soon as results come in.
2222
The Promise-based design provides a *sane* interface to working with out of bound responses.
23+
* **Standard interfaces** -
24+
Allows easy integration with existing higher-level components by implementing
25+
[PSR-7 (http-message)](https://www.php-fig.org/psr/psr-7/) interfaces,
26+
ReactPHP's standard [promises](#promises) and [streaming interfaces](#streaming).
2327
* **Lightweight, SOLID design** -
2428
Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)
2529
and does not get in your way.
2630
Builds on top of well-tested components and well-established concepts instead of reinventing the wheel.
2731
* **Good test coverage** -
28-
Comes with an automated tests suite and is regularly tested in the *real world*
32+
Comes with an automated tests suite and is regularly tested in the *real world*.
2933

3034
**Table of contents**
3135

@@ -652,7 +656,7 @@ This project follows [SemVer](https://semver.org/).
652656
This will install the latest supported version:
653657

654658
```bash
655-
$ composer require clue/buzz-react:^2.4
659+
$ composer require clue/buzz-react:^2.5
656660
```
657661

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

0 commit comments

Comments
 (0)