Skip to content

Commit c684bb7

Browse files
committed
add Config::withIO()
1 parent 987d571 commit c684bb7

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Added
6+
7+
- `Innmind\OperatingSystem\Config::withIO()`
8+
39
## 6.0.0 - 2025-05-24
410

511
### Added

src/Config.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,30 @@ public function mapHalt(\Closure $map): self
211211
);
212212
}
213213

214+
/**
215+
* @psalm-mutation-free
216+
*/
217+
public function withIO(IO $iod): self
218+
{
219+
return new self(
220+
$this->clock,
221+
$this->mapClock,
222+
$io,
223+
$this->halt,
224+
$this->mapHalt,
225+
$this->path,
226+
$this->httpTransport,
227+
$this->mapHttpTransport,
228+
$this->sql,
229+
$this->mapSql,
230+
$this->mapServerControl,
231+
$this->mapServerStatus,
232+
$this->mapFileWatch,
233+
$this->filesystem,
234+
$this->mapFilesystem,
235+
);
236+
}
237+
214238
/**
215239
* @psalm-mutation-free
216240
*/

0 commit comments

Comments
 (0)