Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  specify next release
  require filesystem 7
  • Loading branch information
Baptouuuu committed Oct 22, 2023
2 parents fed3a31 + c90c1f4 commit 8458342
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 5.2.0 - 2023-10-22

### Changed

- Requires `innmind/filesystem:~7.0`

## 5.1.0 - 2023-09-16

### 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.1,<3.3|^3.4.1",
"innmind/filesystem": "~6.2",
"innmind/filesystem": "~7.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 @@ -235,7 +235,7 @@ private function writeInputAndRead(
): array {
return $this
->content
->map(static fn($content) => (new Chunk)($content))
->map(static fn($content) => $content->chunks())
->otherwise(function() {
$this->closeInput($this->input);

Expand Down
2 changes: 1 addition & 1 deletion tests/Server/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function testWithInput()
{
$command = Command::foreground('bin/console')
->withInput(
$input = $this->createMock(Content::class),
$input = Content::none(),
);

$this->assertInstanceOf(Command::class, $command);
Expand Down
13 changes: 9 additions & 4 deletions tests/Server/Process/UnixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
};
use Innmind\TimeWarp\Halt\Usleep;
use Innmind\Url\Path;
use Innmind\IO\IO;
use Innmind\Stream\{
Readable\Stream,
Streams,
Expand Down Expand Up @@ -208,8 +209,10 @@ public function testWithInput()
Streams::fromAmbientAuthority(),
new Usleep,
new Second(1),
Command::foreground('cat')->withInput(Content\OfStream::of(
Stream::of(\fopen('fixtures/symfony.log', 'r')),
Command::foreground('cat')->withInput(Content::oneShot(
IO::of(static fn() => null)->readable()->wrap(
Stream::of(\fopen('fixtures/symfony.log', 'r')),
),
)),
);
$output = '';
Expand All @@ -233,8 +236,10 @@ public function testOverwrite()
new Usleep,
new Second(1),
Command::foreground('cat')
->withInput(Content\OfStream::of(
Stream::of(\fopen('fixtures/symfony.log', 'r')),
->withInput(Content::oneShot(
IO::of(static fn() => null)->readable()->wrap(
Stream::of(\fopen('fixtures/symfony.log', 'r')),
),
))
->overwrite(Path::of('test.log')),
);
Expand Down
7 changes: 5 additions & 2 deletions tests/Server/Processes/UnixTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Innmind\Filesystem\File\Content;
use Innmind\TimeContinuum\Earth\Clock;
use Innmind\TimeWarp\Halt\Usleep;
use Innmind\IO\IO;
use Innmind\Stream\{
Readable\Stream,
Streams,
Expand Down Expand Up @@ -81,8 +82,10 @@ public function testExecuteWithInput()
new Usleep,
);
$process = $processes->execute(
Command::foreground('cat')->withInput(Content\OfStream::of(
Stream::of(\fopen('fixtures/symfony.log', 'r')),
Command::foreground('cat')->withInput(Content::oneShot(
IO::of(static fn() => null)->readable()->wrap(
Stream::of(\fopen('fixtures/symfony.log', 'r')),
),
)),
);

Expand Down

0 comments on commit 8458342

Please sign in to comment.