diff --git a/.travis.yml b/.travis.yml index bd2ae443..12b6dd49 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4 - nightly # ignore errors, see below # lock distro so new future defaults will not break the build diff --git a/tests/DeferredTest.php b/tests/DeferredTest.php index 172cb246..423625c3 100644 --- a/tests/DeferredTest.php +++ b/tests/DeferredTest.php @@ -37,6 +37,8 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerRejectsWithEx public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejectsWithException() { gc_collect_cycles(); + gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on + $deferred = new Deferred(function ($resolve, $reject) { $reject(new \Exception('foo')); }); @@ -50,6 +52,8 @@ public function shouldRejectWithoutCreatingGarbageCyclesIfParentCancellerRejects public function shouldRejectWithoutCreatingGarbageCyclesIfCancellerHoldsReferenceAndExplicitlyRejectWithException() { gc_collect_cycles(); + gc_collect_cycles(); // clear twice to avoid leftovers in PHP 7.4 with ext-xdebug and code coverage turned on + $deferred = new Deferred(function () use (&$deferred) { }); $deferred->reject(new \Exception('foo')); unset($deferred);