diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ae5b70..dfa2fd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest] - php-version: ['8.1'] + php-version: ['8.1', '8.2'] dependencies: ['lowest', 'highest'] name: 'PHPUnit' steps: @@ -35,7 +35,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['8.1'] + php-version: ['8.1', '8.2'] dependencies: ['lowest', 'highest'] name: 'Psalm' steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 86c8e80..07ad463 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 4.3.0 - 2022-12-18 + +### Added + +- Support for `innmind/filesystem:~6.0` + ## 4.2.0 - 2022-07-15 ### Added diff --git a/composer.json b/composer.json index e430d82..ddfa5f7 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "innmind/url": "~4.0", "psr/log": "~3.0", "innmind/time-continuum": "^3.0", - "innmind/filesystem": "^5.0", + "innmind/filesystem": "^5.2|~6.0", "innmind/time-warp": "^3.0" }, "autoload": { diff --git a/src/Server/Process/Started.php b/src/Server/Process/Started.php index c03940e..5bcf04f 100644 --- a/src/Server/Process/Started.php +++ b/src/Server/Process/Started.php @@ -11,7 +11,7 @@ }; use Innmind\Filesystem\{ File\Content, - Adapter\Chunk, + Chunk, }; use Innmind\TimeContinuum\{ Clock, diff --git a/tests/Server/Process/ForegroundTest.php b/tests/Server/Process/ForegroundTest.php index 9d30d53..53928c2 100644 --- a/tests/Server/Process/ForegroundTest.php +++ b/tests/Server/Process/ForegroundTest.php @@ -71,7 +71,8 @@ public function testOutput() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php fixtures/slow.php'), + Command::foreground('php fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = new Foreground($slow()); @@ -100,7 +101,8 @@ public function testExitCodeForFailingProcess() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php fixtures/fails.php'), + Command::foreground('php fixtures/fails.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = new Foreground($fail()); @@ -131,7 +133,8 @@ public function testWait() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php fixtures/slow.php'), + Command::foreground('php fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = new Foreground($slow()); $this->assertInstanceOf( @@ -152,7 +155,8 @@ public function testExitStatusIsKeptInMemory() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php fixtures/slow.php'), + Command::foreground('php fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = new Foreground($slow()); @@ -169,7 +173,8 @@ public function testExitStatusIsAvailableAfterIteratingOverTheOutput() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php fixtures/slow.php'), + Command::foreground('php fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = new Foreground($slow()); $process->output()->toString(); @@ -192,7 +197,8 @@ public function testOutputIsAvailableAfterWaitingForExitStatus() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php fixtures/slow.php'), + Command::foreground('php fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = new Foreground($slow()); $this->assertInstanceOf( diff --git a/tests/Server/Process/UnixTest.php b/tests/Server/Process/UnixTest.php index f24a1f4..3f3bd27 100644 --- a/tests/Server/Process/UnixTest.php +++ b/tests/Server/Process/UnixTest.php @@ -90,7 +90,9 @@ public function testSlowOutput() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php')->withArgument('fixtures/slow.php'), + Command::foreground('php') + ->withArgument('fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = $slow(); $count = 0; @@ -116,7 +118,8 @@ public function testTimeoutSlowOutput() new Second(1), Command::foreground('php') ->withArgument('fixtures/slow.php') - ->timeoutAfter(new Timeout(2)), + ->timeoutAfter(new Timeout(2)) + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = $slow(); $count = 0; @@ -145,7 +148,8 @@ public function testTimeoutWaitSlowProcess() new Second(1), Command::foreground('php') ->withArgument('fixtures/slow.php') - ->timeoutAfter(new Timeout(2)), + ->timeoutAfter(new Timeout(2)) + ->withEnvironment('PATH', $_SERVER['PATH']), ); $process = $slow(); $started = \microtime(true); @@ -185,7 +189,9 @@ public function testWaitFail() Select::timeoutAfter(new ElapsedPeriod(0)), new Usleep, new Second(1), - Command::foreground('php')->withArgument('fixtures/fails.php'), + Command::foreground('php') + ->withArgument('fixtures/fails.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $value = $cat()->wait()->match( diff --git a/tests/Server/Processes/UnixTest.php b/tests/Server/Processes/UnixTest.php index 4d56c08..1c3ebd3 100644 --- a/tests/Server/Processes/UnixTest.php +++ b/tests/Server/Processes/UnixTest.php @@ -43,7 +43,9 @@ public function testExecute() ); $start = \time(); $process = $processes->execute( - Command::foreground('php')->withArgument('fixtures/slow.php'), + Command::foreground('php') + ->withArgument('fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $this->assertInstanceOf(Foreground::class, $process); @@ -60,7 +62,9 @@ public function testExecuteInBackground() ); $start = \time(); $process = $processes->execute( - Command::background('php')->withArgument('fixtures/slow.php'), + Command::background('php') + ->withArgument('fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $this->assertInstanceOf(Background::class, $process); @@ -105,7 +109,9 @@ public function testKill() ); $start = \time(); $process = $processes->execute( - Command::foreground('php')->withArgument('fixtures/slow.php'), + Command::foreground('php') + ->withArgument('fixtures/slow.php') + ->withEnvironment('PATH', $_SERVER['PATH']), ); $pid = $process->pid()->match(