Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  allow to use innmind/filesystem 6
  test against php 8.2
  fix tests
  • Loading branch information
Baptouuuu committed Dec 18, 2022
2 parents 9eea4c5 + 9045f85 commit 5bf45fb
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/Server/Process/Started.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
};
use Innmind\Filesystem\{
File\Content,
Adapter\Chunk,
Chunk,
};
use Innmind\TimeContinuum\{
Clock,
Expand Down
18 changes: 12 additions & 6 deletions tests/Server/Process/ForegroundTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down Expand Up @@ -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());

Expand Down Expand Up @@ -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(
Expand All @@ -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());

Expand All @@ -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();
Expand All @@ -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(
Expand Down
14 changes: 10 additions & 4 deletions tests/Server/Process/UnixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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(
Expand Down
12 changes: 9 additions & 3 deletions tests/Server/Processes/UnixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 5bf45fb

Please sign in to comment.