From f8ddf4750796c6fb135a6935a3342c1e55fc04c4 Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Fri, 13 Nov 2026 20:16:48 +0100 Subject: [PATCH 1/3] chore(harness): restore .harness.json (no change to the ratchet) --- .harness.json | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.harness.json b/.harness.json index 261b5b7..209b201 100644 --- a/.harness.json +++ b/.harness.json @@ -5,18 +5,9 @@ "laravel/prompts" ], "allow_commands": [ - { - "command": "new", - "reason": "the installer is named for the tool, like laravel new; renaming it would change the public API of the CLI" - }, - { - "command": "self-update", - "reason": "the command is named for the tool, like composer self-update; renaming it would change the public API of the CLI" - }, - { - "command": "version", - "reason": "the command is named for the tool; renaming it would change the public API of the CLI" - } + { "command": "new", "reason": "the installer is named for the tool, like laravel new; renaming it would change the public API of the CLI" }, + { "command": "self-update", "reason": "the command is named for the tool, like composer self-update; renaming it would change the public API of the CLI" }, + { "command": "version", "reason": "the command is named for the tool; renaming it would change the public API of the CLI" } ], "ratchet": { "phpstan_level": 8, From f78a7de8efc7ccbee60f1ce5ceb0e0b3872424a3 Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Sat, 14 Nov 2026 13:16:30 +0100 Subject: [PATCH 2/3] test(cli): give the sandbox PATH to child processes on Linux too --- tests/Support/Sandbox.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/Support/Sandbox.php b/tests/Support/Sandbox.php index 27f779a..9541f38 100644 --- a/tests/Support/Sandbox.php +++ b/tests/Support/Sandbox.php @@ -29,6 +29,9 @@ final class Sandbox /** @var array */ private array $originalServer = []; + /** @var array */ + private array $originalSuperEnv = []; + public function __construct() { $this->root = realpath(sys_get_temp_dir()).'/pollora-cli-'.bin2hex(random_bytes(6)); @@ -61,9 +64,16 @@ public function env(string $name, string $value): void $this->originalServer[$name] = $_SERVER[$name] ?? null; } - // Symfony Process only passes on the variables that $_SERVER also knows. + if (! array_key_exists($name, $this->originalSuperEnv)) { + $this->originalSuperEnv[$name] = $_ENV[$name] ?? null; + } + + // Symfony Process builds the environment of a child from the variables that $_SERVER also knows, + // then lets $_ENV override them: $_ENV is empty with the php.ini of macOS (variables_order GPCS) + // and filled on Linux, where it would bring back the original PATH. Both are set. putenv($name.'='.$value); $_SERVER[$name] = $value; + $_ENV[$name] = $value; } /** @@ -129,6 +139,14 @@ public function restore(): void } } + foreach ($this->originalSuperEnv as $name => $value) { + if ($value === null) { + unset($_ENV[$name]); + } else { + $_ENV[$name] = $value; + } + } + self::removeTree($this->root); } From 3b4726b250da99c425e04ff408b46598b33f9940 Mon Sep 17 00:00:00 2001 From: Olivier Gorzalka Date: Sat, 14 Nov 2026 14:56:12 +0100 Subject: [PATCH 3/3] chore(harness): raise the coverage ratchet to 92 --- .harness.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.harness.json b/.harness.json index 209b201..40874b2 100644 --- a/.harness.json +++ b/.harness.json @@ -12,6 +12,6 @@ "ratchet": { "phpstan_level": 8, "phpstan_baseline": 0, - "coverage": 36.86 + "coverage": 92 } }