Skip to content
This repository was archived by the owner on May 10, 2024. It is now read-only.

Commit 17b503a

Browse files
committed
Resolve conflicts
2 parents 26b3b9a + c313d4c commit 17b503a

File tree

78 files changed

+4050
-3349
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4050
-3349
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/.gitattributes export-ignore
2+
/.github/ export-ignore
23
/.gitignore export-ignore
3-
/.travis.yml export-ignore
44
/examples export-ignore
55
/phpunit.xml.dist export-ignore
6+
/phpunit.xml.legacy export-ignore
67
/tests export-ignore

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
PHPUnit:
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-20.04
11+
strategy:
12+
matrix:
13+
php:
14+
- 8.1
15+
- 8.0
16+
- 7.4
17+
- 7.3
18+
- 7.2
19+
- 7.1
20+
- 7.0
21+
- 5.6
22+
- 5.5
23+
- 5.4
24+
- 5.3
25+
steps:
26+
- uses: actions/checkout@v2
27+
- uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php }}
30+
coverage: xdebug
31+
- run: composer install
32+
- run: vendor/bin/phpunit --coverage-text
33+
if: ${{ matrix.php >= 7.3 }}
34+
- run: vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
35+
if: ${{ matrix.php < 7.3 }}
36+
37+
PHPUnit-hhvm:
38+
name: PHPUnit (HHVM)
39+
runs-on: ubuntu-18.04
40+
continue-on-error: true
41+
steps:
42+
- uses: actions/checkout@v2
43+
- uses: azjezz/setup-hhvm@v1
44+
with:
45+
version: lts-3.30
46+
- run: hhvm $(which composer) install
47+
- run: hhvm vendor/bin/phpunit

.travis.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 138 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,142 @@
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+
45+
## 1.5.0 (2021-08-04)
46+
47+
* Feature: Update `Browser` signature to take optional `$connector` as first argument and
48+
to match new Socket API without nullable loop arguments.
49+
(#418 and #419 by @clue)
50+
51+
```php
52+
// unchanged
53+
$browser = new React\Http\Browser();
54+
55+
// deprecated
56+
$browser = new React\Http\Browser(null, $connector);
57+
$browser = new React\Http\Browser($loop, $connector);
58+
59+
// new
60+
$browser = new React\Http\Browser($connector);
61+
$browser = new React\Http\Browser($connector, $loop);
62+
```
63+
64+
* Feature: Rename `Server` to `HttpServer` to avoid class name collisions and
65+
to avoid any ambiguities with regards to the new `SocketServer` API.
66+
(#417 and #419 by @clue)
67+
68+
```php
69+
// deprecated
70+
$server = new React\Http\Server($handler);
71+
$server->listen(new React\Socket\Server(8080));
72+
73+
// new
74+
$http = new React\Http\HttpServer($handler);
75+
$http->listen(new React\Socket\SocketServer('127.0.0.1:8080'));
76+
```
77+
78+
## 1.4.0 (2021-07-11)
79+
80+
A major new feature release, see [**release announcement**](https://clue.engineering/2021/announcing-reactphp-default-loop).
81+
82+
* Feature: Simplify usage by supporting new [default loop](https://reactphp.org/event-loop/#loop).
83+
(#410 by @clue)
84+
85+
```php
86+
// old (still supported)
87+
$browser = new React\Http\Browser($loop);
88+
$server = new React\Http\Server($loop, $handler);
89+
90+
// new (using default loop)
91+
$browser = new React\Http\Browser();
92+
$server = new React\Http\Server($handler);
93+
```
94+
95+
## 1.3.0 (2021-04-11)
96+
97+
* Feature: Support persistent connections (`Connection: keep-alive`).
98+
(#405 by @clue)
99+
100+
This shows a noticeable performance improvement especially when benchmarking
101+
using persistent connections (which is the default pretty much everywhere).
102+
Together with other changes in this release, this improves benchmarking
103+
performance by around 100%.
104+
105+
* Feature: Require `Host` request header for HTTP/1.1 requests.
106+
(#404 by @clue)
107+
108+
* Minor documentation improvements.
109+
(#398 by @fritz-gerneth and #399 and #400 by @pavog)
110+
111+
* Improve test suite, use GitHub actions for continuous integration (CI).
112+
(#402 by @SimonFrings)
113+
114+
## 1.2.0 (2020-12-04)
115+
116+
* Feature: Keep request body in memory also after consuming request body.
117+
(#395 by @clue)
118+
119+
This means consumers can now always access the complete request body as
120+
detailed in the documentation. This allows building custom parsers and more
121+
advanced processing models without having to mess with the default parsers.
122+
123+
## 1.1.0 (2020-09-11)
124+
125+
* Feature: Support upcoming PHP 8 release, update to reactphp/socket v1.6 and adjust type checks for invalid chunk headers.
126+
(#391 by @clue)
127+
128+
* Feature: Consistently resolve base URL according to HTTP specs.
129+
(#379 by @clue)
130+
131+
* Feature / Fix: Expose `Transfer-Encoding: chunked` response header and fix chunked responses for `HEAD` requests.
132+
(#381 by @clue)
133+
134+
* Internal refactoring to remove unneeded `MessageFactory` and `Response` classes.
135+
(#380 and #389 by @clue)
136+
137+
* Minor documentation improvements and improve test suite, update to support PHPUnit 9.3.
138+
(#385 by @clue and #393 by @SimonFrings)
139+
3140
## 1.0.0 (2020-07-11)
4141

5142
A major new feature release, see [**release announcement**](https://clue.engineering/2020/announcing-reactphp-http).
@@ -84,7 +221,7 @@ minutes. See below for more details:
84221

85222
This improves default concurrency to 1024 requests and caps the default request buffer at 64K.
86223
The previous defaults resulted in just 4 concurrent requests with a request buffer of 8M.
87-
See [`Server`](../README.md#server) for details on how to override these defaults.
224+
See [`Server`](README.md#server) for details on how to override these defaults.
88225

89226
* Feature: Expose ReactPHP in `User-Agent` client-side request header and in `Server` server-side response header.
90227
(#374 by @clue)

0 commit comments

Comments
 (0)