Skip to content

Added promises v3 + php 81 82 #9

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ jobs:
test-php74:
docker:
- image: circleci/php:7.4-cli

working_directory: ~/project
steps:
- checkout
Expand All @@ -18,7 +17,32 @@ jobs:
test-php80:
docker:
- image: circleci/php:8.0-cli
working_directory: ~/project
steps:
- checkout

- run:
name: Run tests
command: |
composer update -n --prefer-dist --no-suggest
php vendor/bin/phpunit

test-php81:
docker:
- image: cimg/php:8.1
working_directory: ~/project
steps:
- checkout

- run:
name: Run tests
command: |
composer update -n --prefer-dist --no-suggest
php vendor/bin/phpunit

test-php82:
docker:
- image: cimg/php:8.2
working_directory: ~/project
steps:
- checkout
Expand All @@ -34,4 +58,6 @@ workflows:
test:
jobs:
- test-php74
- test-php80
- test-php80
- test-php81
- test-php82
1 change: 1 addition & 0 deletions .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -0,0 +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}}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"require": {
"php": "^7.4 || ^8.0",
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5",
"react/promise": "^2.7 || ^1.2.1",
"react/promise": "^3",
"react/child-process": "^0.6",
"react/promise-timer": "^1.5",
"react/stream": "^1.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/SleepTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function testIt()
$loop = Factory::create();
$elements = [];

$promiseXZ = resolve()
$promiseXZ = resolve(null)
->then(function() use (&$elements){
$elements[] = 'X';
})
Expand All @@ -30,7 +30,7 @@ function testIt()
$elements[] = 'Z';
});

$promiseY = resolve()
$promiseY = resolve(null)
->then(function() use ($loop) {
return React\sleep(1, $loop);
})
Expand Down
4 changes: 2 additions & 2 deletions tests/UsleepTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function testIt()
$loop = Factory::create();
$elements = [];

$promiseXZ = resolve()
$promiseXZ = resolve(null)
->then(function() use (&$elements){
$elements[] = 'X';
})
Expand All @@ -30,7 +30,7 @@ function testIt()
$elements[] = 'Z';
});

$promiseY = resolve()
$promiseY = resolve(null)
->then(function() use ($loop) {
return React\usleep(100, $loop);
})
Expand Down