From 74c8b5f145ce73c5c0cd55cc6d3e86f7d521ad52 Mon Sep 17 00:00:00 2001 From: Niklas Keller Date: Wed, 13 Dec 2017 23:40:53 +0100 Subject: [PATCH] Fix intentional example error and improve Travis build Examples are now executed in a subshell, so a failure doesn't terminate the complete build. --- .travis.yml | 2 +- examples/2-echo.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1052c7b..d850c56 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: script: # Run with phpdbg or xdebug as soon as one of both doesn't segfault anymore - vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml - - for f in examples/*.php; do echo $f && if ! php $f; then echo '!! failed !!' && exit 1; fi && echo "-------"; done + - (for f in examples/*.php; do echo $f && if ! php $f; then echo '!! failed !!' && exit 1; fi && echo "-------"; done) - PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer --diff --dry-run -v fix after_script: diff --git a/examples/2-echo.php b/examples/2-echo.php index cd4a7ea..353f81a 100644 --- a/examples/2-echo.php +++ b/examples/2-echo.php @@ -4,7 +4,7 @@ require __DIR__ . '/../vendor/autoload.php'; use function Amp\ParallelFunctions\parallelMap; use function Amp\Promise\wait; -f + // All output in the parallel environment is redirected to STDERR of the parent process automatically. // You might notice that the output order varies here when running it multiple times. wait(parallelMap([1, 2, 3], 'var_dump')); \ No newline at end of file