diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ffa9c0..5504297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Added + +- `Innmind\OperatingSystem\Config::withIO()` + ## 6.0.0 - 2025-05-24 ### Added diff --git a/src/Config.php b/src/Config.php index d8b279d..afdf2f4 100644 --- a/src/Config.php +++ b/src/Config.php @@ -211,6 +211,30 @@ public function mapHalt(\Closure $map): self ); } + /** + * @psalm-mutation-free + */ + public function withIO(IO $io): self + { + return new self( + $this->clock, + $this->mapClock, + $io, + $this->halt, + $this->mapHalt, + $this->path, + $this->httpTransport, + $this->mapHttpTransport, + $this->sql, + $this->mapSql, + $this->mapServerControl, + $this->mapServerStatus, + $this->mapFileWatch, + $this->filesystem, + $this->mapFilesystem, + ); + } + /** * @psalm-mutation-free */