Skip to content

Commit 5305f53

Browse files
committed
Forward compatibility with upcoming Promise v3
1 parent 8b2f18c commit 5305f53

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
with:
2828
php-version: ${{ matrix.php }}
2929
coverage: xdebug
30+
env:
31+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3032
- run: composer install
3133
- run: vendor/bin/phpunit --coverage-text
3234
if: ${{ matrix.php >= 7.3 }}
@@ -37,6 +39,7 @@ jobs:
3739
name: PHPUnit (HHVM)
3840
runs-on: ubuntu-18.04
3941
continue-on-error: true
42+
if: false # temporarily skipped until https://github.com/azjezz/setup-hhvm/issues/3 is addressed
4043
steps:
4144
- uses: actions/checkout@v2
4245
- uses: azjezz/setup-hhvm@v1

composer.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,25 @@
1212
],
1313
"require": {
1414
"php": ">=5.3",
15-
"react/promise": " ^2.1 || ^1.2.1",
16-
"react/socket": "^1.9",
15+
"react/promise": "^3@dev || ^2.1 || ^1.2.1",
16+
"react/socket": "dev-promise-3 as 1.12.0",
1717
"ringcentral/psr7": "^1.2"
1818
},
1919
"require-dev": {
20-
"clue/block-react": "^1.1",
20+
"clue/block-react": "^1.5",
2121
"phpunit/phpunit": "^9.3 || ^5.7 || ^4.8",
22-
"react/event-loop": "^1.2",
23-
"react/http": "^1.5"
22+
"react/event-loop": "^1.2"
2423
},
2524
"autoload": {
2625
"psr-4": { "Clue\\React\\HttpProxy\\": "src/" }
2726
},
2827
"autoload-dev": {
2928
"psr-4": { "Clue\\Tests\\React\\HttpProxy\\": "tests/" }
30-
}
29+
},
30+
"repositories": [
31+
{
32+
"type": "vcs",
33+
"url": "https://github.com/WyriHaximus-labs/socket"
34+
}
35+
]
3136
}

tests/ProxyConnectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function testCancelPromiseWillCancelPendingConnection()
137137

138138
$promise = $proxy->connect('google.com:80');
139139

140-
$this->assertInstanceOf('React\Promise\CancellablePromiseInterface', $promise);
140+
$this->assertInstanceOf('React\Promise\PromiseInterface', $promise);
141141

142142
$promise->cancel();
143143
}
@@ -475,7 +475,7 @@ public function testCancelPromiseWhileConnectionIsReadyWillCloseOpenConnectionAn
475475

476476
$deferred->resolve($stream);
477477

478-
$this->assertInstanceOf('React\Promise\CancellablePromiseInterface', $promise);
478+
$this->assertInstanceOf('React\Promise\PromiseInterface', $promise);
479479

480480
$promise->cancel();
481481

0 commit comments

Comments
 (0)