Skip to content

Commit 108dbd0

Browse files
committed
Merge pull request #23 from
WyriHaximus-labs/support-react-stream-1.0-and-0.7 Support react/stream 1.0 and 0.7
2 parents ebcf641 + aef1d97 commit 108dbd0

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
},
1616
"require": {
1717
"php": ">=5.3",
18-
"react/stream": "^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3"
18+
"react/stream": "^1.0 || ^0.7 || ^0.6 || ^0.5 || ^0.4 || ^0.3"
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^5.0 || ^4.8",
2222
"react/event-loop": "^0.4 || ^0.3",
23-
"react/stream": "^0.6"
23+
"react/stream": "^1.0 || ^0.7"
2424
}
2525
}

tests/ControlCodeParserTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

3-
use React\Stream\ReadableStream;
43
use Clue\React\Term\ControlCodeParser;
4+
use React\Stream\ThroughStream;
55

66
class ControlCodeParserTest extends TestCase
77
{
@@ -10,7 +10,7 @@ class ControlCodeParserTest extends TestCase
1010

1111
public function setUp()
1212
{
13-
$this->input = new ReadableStream();
13+
$this->input = new ThroughStream();
1414
$this->parser = new ControlCodeParser($this->input);
1515
}
1616

@@ -264,7 +264,7 @@ public function testClosingParserWillCloseInput()
264264

265265
public function testClosingParserWillRemoveAllDataListeners()
266266
{
267-
$this->input = new ReadableStream();
267+
$this->input = new ThroughStream();
268268
$this->parser = new ControlCodeParser($this->input);
269269

270270
$this->parser->on('data', $this->expectCallableNever());
@@ -300,7 +300,7 @@ public function testPassingClosedInputToParserWillCloseParser()
300300

301301
public function testPassingClosedInputToParserWillNotAddAnyDataListeners()
302302
{
303-
$this->input = new ReadableStream();
303+
$this->input = new ThroughStream();
304304
$this->input->close();
305305

306306
$this->parser = new ControlCodeParser($this->input);

tests/FunctionalControlCodeParserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
22

3-
use React\EventLoop\Factory;
4-
use React\Stream\Stream;
53
use Clue\React\Term\ControlCodeParser;
4+
use React\EventLoop\Factory;
5+
use React\Stream\ReadableResourceStream;
66

77
class FunctionalControlCodeParserTest extends TestCase
88
{
99
public function testPipingReadme()
1010
{
1111
$loop = Factory::create();
1212

13-
$input = new Stream(fopen(__DIR__ . '/../README.md', 'r+'), $loop);
13+
$input = new ReadableResourceStream(fopen(__DIR__ . '/../README.md', 'r+'), $loop);
1414
$parser = new ControlCodeParser($input);
1515

1616
$buffer = '';

0 commit comments

Comments
 (0)