Skip to content

Commit 80c988a

Browse files
committed
First upgrade step
1 parent 3bcf964 commit 80c988a

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
},
1919
"require": {
2020
"php": ">=5.3",
21-
"react/event-loop": "~0.3.0|~0.4.0",
22-
"clue/buzz-react": "^0.5",
23-
"react/promise": "~2.0|~1.1",
24-
"clue/json-stream": "~0.1.0",
25-
"rize/uri-template": "^0.3",
26-
"clue/promise-stream-react": "^0.1"
21+
"clue/buzz-react": "^1.0",
22+
"clue/json-stream": "^0.1",
23+
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3",
24+
"react/promise": "^2.0 || ^1.1",
25+
"react/promise-stream": "^1.0",
26+
"rize/uri-template": "^0.3"
2727
},
2828
"require-dev": {
29-
"clue/block-react": "~0.3.0",
30-
"clue/caret-notation": "~0.2.0",
31-
"clue/tar-react": "~0.1.0",
29+
"clue/block-react": "^1.0 || ^0.3",
30+
"clue/caret-notation": "^0.2",
31+
"clue/tar-react": "^0.2 || ^0.1",
3232
"phpunit/phpunit": "^7.0 || ^6.0 || ^5.0 || ^4.8.35"
3333
}
3434
}

src/Io/StreamingParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Clue\React\Docker\Io;
44

5-
use Clue\React\Promise\Stream;
65
use Psr\Http\Message\ResponseInterface;
7-
use React\Promise\PromiseInterface;
86
use React\Promise\Deferred;
7+
use React\Promise\PromiseInterface;
8+
use React\Promise\Stream;
99
use React\Stream\ReadableStreamInterface;
1010
use RuntimeException;
1111

tests/FunctionalClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
use Clue\React\Block;
66
use Clue\React\Docker\Client;
7-
use Clue\React\Promise\Stream;
87
use React\EventLoop\Factory as LoopFactory;
8+
use React\Promise\Stream;
99

1010
class FunctionalClientTest extends TestCase
1111
{

tests/Io/StreamingParserTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public function setUp()
2020

2121
public function testJsonPassingRejectedPromiseResolvesWithClosedStream()
2222
{
23-
$stream = $this->parser->parseJsonStream(Promise\reject());
23+
$stream = $this->parser->parseJsonStream(Promise\reject(new \RuntimeException()));
2424

2525
$this->assertInstanceOf('React\Stream\ReadableStreamInterface', $stream);
2626
$this->assertFalse($stream->isReadable());
@@ -62,7 +62,7 @@ public function testJsonResolvingPromiseWithWrongValueWillEmitErrorAndCloseEvent
6262

6363
public function testPlainPassingRejectedPromiseResolvesWithClosedStream()
6464
{
65-
$stream = $this->parser->parsePlainStream(Promise\reject());
65+
$stream = $this->parser->parsePlainStream(Promise\reject(new \RuntimeException()));
6666

6767
$this->assertInstanceOf('React\Stream\ReadableStreamInterface', $stream);
6868
$this->assertFalse($stream->isReadable());
@@ -102,12 +102,12 @@ public function testDeferredStreamErrorEventWillRejectPromise()
102102

103103
$stream->emit('data', array('a'));
104104

105-
$stream->emit('error', array('value', 'ignord'));
105+
$stream->emit('error', array(new \RuntimeException()));
106106

107107
$stream->close();
108108

109109
$this->expectPromiseReject($promise);
110-
$promise->then(null, $this->expectCallableOnceWith('value'));
110+
$promise->then(null, $this->expectCallableOnceWith($this->isInstanceOf('RuntimeException')));
111111
}
112112

113113
public function testDeferredCancelingPromiseWillCloseStream()

0 commit comments

Comments
 (0)