From 61edc8a52155c9541a35a7a5b228ca4465c54f90 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 31 Mar 2025 18:56:08 +0200 Subject: [PATCH 1/3] fix: $iniSettings on ChildProcess.php --- src/ChildProcess.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ChildProcess.php b/src/ChildProcess.php index 19a9420..b062c5a 100644 --- a/src/ChildProcess.php +++ b/src/ChildProcess.php @@ -19,6 +19,8 @@ class ChildProcess implements ChildProcessContract public readonly bool $persistent; + public readonly ?array $iniSettings; + final public function __construct(protected Client $client) {} public function get(?string $alias = null): ?self From 729a3700fc4b64e799d8e99bc162c7e2281c001e Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Mon, 31 Mar 2025 20:58:23 +0200 Subject: [PATCH 2/3] fix: ensure properties are set only if they exist --- src/ChildProcess.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ChildProcess.php b/src/ChildProcess.php index b062c5a..f0fe8a9 100644 --- a/src/ChildProcess.php +++ b/src/ChildProcess.php @@ -149,7 +149,9 @@ protected function fromRuntimeProcess($process) } foreach ($process['settings'] as $key => $value) { - $this->{$key} = $value; + if (property_exists($this, $key)) { + $this->{$key} = $value; + } } return $this; From 2c26e6e759251d0046d052e562942374a059a859 Mon Sep 17 00:00:00 2001 From: Eser DENIZ Date: Tue, 1 Apr 2025 14:47:23 +0200 Subject: [PATCH 3/3] fix: throw exception for non-existent properties in ChildProcess --- src/ChildProcess.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ChildProcess.php b/src/ChildProcess.php index f0fe8a9..6ba9972 100644 --- a/src/ChildProcess.php +++ b/src/ChildProcess.php @@ -149,9 +149,11 @@ protected function fromRuntimeProcess($process) } foreach ($process['settings'] as $key => $value) { - if (property_exists($this, $key)) { - $this->{$key} = $value; + if (! property_exists($this, $key)) { + throw new \RuntimeException("Property {$key} does not exist on ".__CLASS__); } + + $this->{$key} = $value; } return $this;