Skip to content

Commit a01c120

Browse files
committed
Forward compatibility with Stream v0.5 and upcoming v0.6
1 parent 26b32eb commit a01c120

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@ $connection->on('data', function ($chunk) {
346346
echo $data;
347347
});
348348

349+
$conenction->on('end', function () {
350+
echo 'ended';
351+
});
352+
353+
$conenction->on('error', function (Exception $e) {
354+
echo 'error: ' . $e->getMessage();
355+
});
356+
349357
$conenction->on('close', function () {
350358
echo 'closed';
351359
});

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"php": ">=5.3.0",
88
"evenement/evenement": "~2.0|~1.0",
99
"react/event-loop": "0.4.*|0.3.*",
10-
"react/stream": "^0.4.5",
10+
"react/stream": "^0.6 || ^0.5 || ^0.4.5",
1111
"react/promise": "^2.0 || ^1.1"
1212
},
1313
"require-dev": {

0 commit comments

Comments
 (0)