File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,13 @@ client/server and interaction with processes. Third-party libraries can use thes
23
23
components to create async network clients/servers and more.
24
24
25
25
``` php
26
- $server = new React\Http\Server(function (Psr\Http\Message\ServerRequestInterface $request) {
27
- return new React\Http\Message\Response(
28
- 200,
29
- array(
30
- 'Content-Type' => 'text/plain'
31
- ),
26
+ $server = new React\Http\HttpServer(function (Psr\Http\Message\ServerRequestInterface $request) {
27
+ return React\Http\Message\Response::plaintext(
32
28
"Hello World!\n"
33
29
);
34
30
});
35
31
36
- $socket = new React\Socket\Server ('127.0.0.1:8080');
32
+ $socket = new React\Socket\SocketServer ('127.0.0.1:8080');
37
33
$server->listen($socket);
38
34
39
35
echo "Server running at http://127.0.0.1:8080" . PHP_EOL;
Original file line number Diff line number Diff line change 12
12
"react/cache" : " ^1.0" ,
13
13
"react/dns" : " ^1.8" ,
14
14
"react/event-loop" : " ^1.2" ,
15
- "react/http" : " ^1.4 " ,
15
+ "react/http" : " ^1.6 " ,
16
16
"react/promise" : " ^2.1 || ^1.2" ,
17
17
"react/promise-stream" : " ^1.1.1" ,
18
18
"react/promise-timer" : " ^1.7" ,
19
- "react/socket" : " ^1.8 " ,
19
+ "react/socket" : " ^1.9 " ,
20
20
"react/stream" : " ^1.2"
21
21
},
22
22
"require-dev" : {
Original file line number Diff line number Diff line change 6
6
<directory >./vendor/react/*/tests/</directory >
7
7
<!-- temporarily skip broken und unneeded tests, see https://github.com/reactphp/event-loop/pull/232 -->
8
8
<exclude >./vendor/react/event-loop/tests/BinTest.php</exclude >
9
+ <!-- temporarily skip broken und unneeded tests, see https://github.com/reactphp/http/pull/440 -->
10
+ <exclude >./vendor/react/http/tests/HttpServerTest.php</exclude >
9
11
</testsuite >
10
12
</testsuites >
11
13
You can’t perform that action at this time.
0 commit comments