Skip to content

Commit 5ca07c4

Browse files
authored
fix: $iniSettings on ChildProcess.php (#535)
* fix: $iniSettings on ChildProcess.php * fix: ensure properties are set only if they exist * fix: throw exception for non-existent properties in ChildProcess
1 parent c1f334d commit 5ca07c4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ChildProcess.php

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class ChildProcess implements ChildProcessContract
1919

2020
public readonly bool $persistent;
2121

22+
public readonly ?array $iniSettings;
23+
2224
final public function __construct(protected Client $client) {}
2325

2426
public function get(?string $alias = null): ?self
@@ -147,6 +149,10 @@ protected function fromRuntimeProcess($process)
147149
}
148150

149151
foreach ($process['settings'] as $key => $value) {
152+
if (! property_exists($this, $key)) {
153+
throw new \RuntimeException("Property {$key} does not exist on ".__CLASS__);
154+
}
155+
150156
$this->{$key} = $value;
151157
}
152158

0 commit comments

Comments
 (0)