Skip to content

Commit

Permalink
Prepare v1.6.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Feb 3, 2022
1 parent 0b4ed9f commit 59961cc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
# Changelog

## 1.6.0 (2022-02-03)

* Feature: Add factory methods for common HTML/JSON/plaintext/XML response types.
(#439 by @clue)

```php
$response = React\Http\Response\html("<h1>Hello wörld!</h1>\n");
$response = React\Http\Response\json(['message' => 'Hello wörld!']);
$response = React\Http\Response\plaintext("Hello wörld!\n");
$response = React\Http\Response\xml("<message>Hello wörld!</message>\n");
$response = React\Http\Response\redirect('https://reactphp.org/');
```

* Feature: Expose all status code constants via `Response` class.
(#432 by @clue)

```php
$response = new React\Http\Message\Response(
React\Http\Message\Response::STATUS_OK, // 200 OK
);
$response = new React\Http\Message\Response(
React\Http\Message\Response::STATUS_NOT_FOUND, // 404 Not Found
);
```

* Feature: Full support for PHP 8.1 release.
(#433 by @SimonFrings and #434 by @clue)

* Feature / Fix: Improve protocol handling for HTTP responses with no body.
(#429 and #430 by @clue)

* Internal refactoring and internal improvements for handling requests and responses.
(#422 by @WyriHaximus and #431 by @clue)

* Improve documentation, update proxy examples, include error reporting in examples.
(#420, #424, #426, and #427 by @clue)

* Update test suite to use default loop.
(#438 by @clue)

## 1.5.0 (2021-08-04)

* Feature: Update `Browser` signature to take optional `$connector` as first argument and
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2904,27 +2904,27 @@ new React\Http\Middleware\RequestBodyParserMiddleware(10 * 1024, 100); // 100 fi

## Install

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

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

```bash
$ composer require react/http:^1.5
$ composer require react/http:^1.6
```

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

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

## Tests

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

```bash
$ composer install
Expand All @@ -2933,15 +2933,15 @@ $ composer install
To run the test suite, go to the project root and run:

```bash
$ php vendor/bin/phpunit
$ vendor/bin/phpunit
```

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

```bash
$ php vendor/bin/phpunit --exclude-group internet
$ vendor/bin/phpunit --exclude-group internet
```

## License
Expand Down

0 comments on commit 59961cc

Please sign in to comment.