Skip to content

Commit ac2b6a7

Browse files
committed
Run tests on PHP 7.4
1 parent 1150e0a commit ac2b6a7

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ php:
66
- 5.6
77
- 7.0
88
- 7.1
9+
- 7.2
10+
- 7.3
11+
- 7.4
912
- nightly # ignore errors, see below
1013
- hhvm # ignore errors, see below
1114

tests/DeferredTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ public function progressIsAnAliasForNotify()
4444
public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithException()
4545
{
4646
gc_collect_cycles();
47+
gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
48+
4749
$deferred = new Deferred(function ($resolve, $reject) {
4850
$reject(new \Exception('foo'));
4951
});
@@ -57,6 +59,8 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx
5759
public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException()
5860
{
5961
gc_collect_cycles();
62+
gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
63+
6064
$deferred = new Deferred(function ($resolve, $reject) {
6165
$reject(new \Exception('foo'));
6266
});

tests/FulfilledPromiseTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function shouldThrowExceptionIfConstructedWithAPromise()
5252
public function shouldNotLeaveGarbageCyclesWhenRemovingLastReferenceToFulfilledPromiseWithAlwaysFollowers()
5353
{
5454
gc_collect_cycles();
55+
gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
56+
5557
$promise = new FulfilledPromise(1);
5658
$promise->always(function () {
5759
throw new \RuntimeException();

tests/PromiseTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ public function shouldRejectIfResolverThrowsException()
5252
public function shouldResolveWithoutCreatingGarbageCyclesIfResolverResolvesWithException()
5353
{
5454
gc_collect_cycles();
55+
gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on
56+
5557
$promise = new Promise(function ($resolve) {
5658
$resolve(new \Exception('foo'));
5759
});

0 commit comments

Comments
 (0)