Skip to content

Commit 59961cc

Browse files
committed
Prepare v1.6.0 release
1 parent 0b4ed9f commit 59961cc

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

CHANGELOG.md

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

3+
## 1.6.0 (2022-02-03)
4+
5+
* Feature: Add factory methods for common HTML/JSON/plaintext/XML response types.
6+
(#439 by @clue)
7+
8+
```php
9+
$response = React\Http\Response\html("<h1>Hello wörld!</h1>\n");
10+
$response = React\Http\Response\json(['message' => 'Hello wörld!']);
11+
$response = React\Http\Response\plaintext("Hello wörld!\n");
12+
$response = React\Http\Response\xml("<message>Hello wörld!</message>\n");
13+
$response = React\Http\Response\redirect('https://reactphp.org/');
14+
```
15+
16+
* Feature: Expose all status code constants via `Response` class.
17+
(#432 by @clue)
18+
19+
```php
20+
$response = new React\Http\Message\Response(
21+
React\Http\Message\Response::STATUS_OK, // 200 OK
22+
23+
);
24+
$response = new React\Http\Message\Response(
25+
React\Http\Message\Response::STATUS_NOT_FOUND, // 404 Not Found
26+
27+
);
28+
```
29+
30+
* Feature: Full support for PHP 8.1 release.
31+
(#433 by @SimonFrings and #434 by @clue)
32+
33+
* Feature / Fix: Improve protocol handling for HTTP responses with no body.
34+
(#429 and #430 by @clue)
35+
36+
* Internal refactoring and internal improvements for handling requests and responses.
37+
(#422 by @WyriHaximus and #431 by @clue)
38+
39+
* Improve documentation, update proxy examples, include error reporting in examples.
40+
(#420, #424, #426, and #427 by @clue)
41+
42+
* Update test suite to use default loop.
43+
(#438 by @clue)
44+
345
## 1.5.0 (2021-08-04)
446

547
* Feature: Update `Browser` signature to take optional `$connector` as first argument and

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2904,27 +2904,27 @@ new React\Http\Middleware\RequestBodyParserMiddleware(10 * 1024, 100); // 100 fi
29042904

29052905
## Install
29062906

2907-
The recommended way to install this library is [through Composer](https://getcomposer.org).
2907+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
29082908
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
29092909

29102910
This project follows [SemVer](https://semver.org/).
29112911
This will install the latest supported version:
29122912

29132913
```bash
2914-
$ composer require react/http:^1.5
2914+
$ composer require react/http:^1.6
29152915
```
29162916

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

29192919
This project aims to run on any platform and thus does not require any PHP
29202920
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
29212921
HHVM.
2922-
It's *highly recommended to use PHP 7+* for this project.
2922+
It's *highly recommended to use the latest supported PHP version* for this project.
29232923

29242924
## Tests
29252925

29262926
To run the test suite, you first need to clone this repo and then install all
2927-
dependencies [through Composer](https://getcomposer.org):
2927+
dependencies [through Composer](https://getcomposer.org/):
29282928

29292929
```bash
29302930
$ composer install
@@ -2933,15 +2933,15 @@ $ composer install
29332933
To run the test suite, go to the project root and run:
29342934

29352935
```bash
2936-
$ php vendor/bin/phpunit
2936+
$ vendor/bin/phpunit
29372937
```
29382938

29392939
The test suite also contains a number of functional integration tests that rely
29402940
on a stable internet connection.
29412941
If you do not want to run these, they can simply be skipped like this:
29422942

29432943
```bash
2944-
$ php vendor/bin/phpunit --exclude-group internet
2944+
$ vendor/bin/phpunit --exclude-group internet
29452945
```
29462946

29472947
## License

0 commit comments

Comments
 (0)