From 4e9acec41adbe3b8f7adc2e82d5294eb29cae673 Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Sun, 21 Jul 2024 21:47:40 -0400 Subject: [PATCH 1/3] Move caller reference to debug instead of dynamic property assignment --- src/Process/ShellCommand.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Process/ShellCommand.php b/src/Process/ShellCommand.php index de765c0..9a33b1e 100644 --- a/src/Process/ShellCommand.php +++ b/src/Process/ShellCommand.php @@ -49,7 +49,7 @@ protected function run($command, $positional = [], $assoc = []) $assoc = \WP_CLI\Utils\assoc_args_to_str($assoc); $run_command = $this->rootCommand() . " $command $positional $assoc"; - Command::debug("Running: $run_command"); + Command::debug(static::class, "Running: $run_command"); $result = Process::create( $run_command, @@ -57,8 +57,6 @@ protected function run($command, $positional = [], $assoc = []) $this->getEnv() )->run(); - $result->caller = static::class; - Command::debug($result); if ($result->return_code > 0) { From 61b4db505d0a4f6a72a40a8ba832c41fa4a2fbd0 Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Sun, 21 Jul 2024 21:49:41 -0400 Subject: [PATCH 2/3] Extend test matrix for behat to include PHP 8.2 --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16f3a6f..c8170ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,7 +35,7 @@ jobs: needs: lint strategy: matrix: - php-version: ['7.4'] + php-version: ['7.4', '8.2'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From c9ce59b4caa9f4d8c5f9b6d5bb8ed646243cab3d Mon Sep 17 00:00:00 2001 From: Evan Mattson Date: Sun, 21 Jul 2024 22:11:15 -0400 Subject: [PATCH 3/3] Update tests referencing env variables --- features/valet-new-project-bedrock.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/features/valet-new-project-bedrock.feature b/features/valet-new-project-bedrock.feature index d3bfa93..dac57e9 100644 --- a/features/valet-new-project-bedrock.feature +++ b/features/valet-new-project-bedrock.feature @@ -55,7 +55,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_PREFIX='foo' """ - And I run `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/` + And I run `wp eval 'echo $_SERVER["DB_PREFIX"];' --path={PATH}/{PROJECT}/web/wp/` Then STDOUT should be: """ foo @@ -70,7 +70,7 @@ Feature: It can create new installs for Valet-supported WordPress projects. """ DB_HOST='127.0.0.1' """ - And I run `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/` + And I run `wp eval 'echo $_SERVER["DB_HOST"];' --path={PROJECT}/web/wp/` Then STDOUT should be: """ 127.0.0.1