Skip to content

Commit f5f8a9d

Browse files
authored
Added promises v3 + php 81 82 (#9)
1 parent 5717a2f commit f5f8a9d

File tree

5 files changed

+34
-7
lines changed

5 files changed

+34
-7
lines changed

.circleci/config.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ jobs:
44
test-php74:
55
docker:
66
- image: circleci/php:7.4-cli
7-
87
working_directory: ~/project
98
steps:
109
- checkout
@@ -18,7 +17,32 @@ jobs:
1817
test-php80:
1918
docker:
2019
- image: circleci/php:8.0-cli
20+
working_directory: ~/project
21+
steps:
22+
- checkout
23+
24+
- run:
25+
name: Run tests
26+
command: |
27+
composer update -n --prefer-dist --no-suggest
28+
php vendor/bin/phpunit
29+
30+
test-php81:
31+
docker:
32+
- image: cimg/php:8.1
33+
working_directory: ~/project
34+
steps:
35+
- checkout
2136

37+
- run:
38+
name: Run tests
39+
command: |
40+
composer update -n --prefer-dist --no-suggest
41+
php vendor/bin/phpunit
42+
43+
test-php82:
44+
docker:
45+
- image: cimg/php:8.2
2246
working_directory: ~/project
2347
steps:
2448
- checkout
@@ -34,4 +58,6 @@ workflows:
3458
test:
3559
jobs:
3660
- test-php74
37-
- test-php80
61+
- test-php80
62+
- test-php81
63+
- test-php82

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"version":1,"defects":{"Drift\\React\\Tests\\SleepTest::testIt":4},"times":{"Drift\\React\\Tests\\MimeContentTypeTest::testItResolvesWithMimeType":0.048,"Drift\\React\\Tests\\MimeContentTypeTest::testIfRejectsOnFailure with data set #0":0.024,"Drift\\React\\Tests\\MimeContentTypeTest::testIfRejectsOnFailure with data set #1":0.015,"Drift\\React\\Tests\\SleepTest::testIt":0}}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"require": {
1616
"php": "^7.4 || ^8.0",
1717
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
18-
"react/promise": "^2.7 || ^1.2.1",
18+
"react/promise": "^3",
1919
"react/child-process": "^0.6",
2020
"react/promise-timer": "^1.5",
2121
"react/stream": "^1.0"

tests/SleepTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function testIt()
1919
$loop = Factory::create();
2020
$elements = [];
2121

22-
$promiseXZ = resolve()
22+
$promiseXZ = resolve(null)
2323
->then(function() use (&$elements){
2424
$elements[] = 'X';
2525
})
@@ -30,7 +30,7 @@ function testIt()
3030
$elements[] = 'Z';
3131
});
3232

33-
$promiseY = resolve()
33+
$promiseY = resolve(null)
3434
->then(function() use ($loop) {
3535
return React\sleep(1, $loop);
3636
})

tests/UsleepTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function testIt()
1919
$loop = Factory::create();
2020
$elements = [];
2121

22-
$promiseXZ = resolve()
22+
$promiseXZ = resolve(null)
2323
->then(function() use (&$elements){
2424
$elements[] = 'X';
2525
})
@@ -30,7 +30,7 @@ function testIt()
3030
$elements[] = 'Z';
3131
});
3232

33-
$promiseY = resolve()
33+
$promiseY = resolve(null)
3434
->then(function() use ($loop) {
3535
return React\usleep(100, $loop);
3636
})

0 commit comments

Comments
 (0)