Skip to content

Commit 2bc5520

Browse files
authored
Fix deprecation notices (#93)
* Move caller reference to debug instead of dynamic property assignment * Extend test matrix for behat to include PHP 8.2 * Update tests referencing env variables
1 parent bd38352 commit 2bc5520

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
needs: lint
3636
strategy:
3737
matrix:
38-
php-version: ['7.4']
38+
php-version: ['7.4', '8.2']
3939
runs-on: ubuntu-latest
4040
steps:
4141
- uses: actions/checkout@v4

features/valet-new-project-bedrock.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Feature: It can create new installs for Valet-supported WordPress projects.
5555
"""
5656
DB_PREFIX='foo'
5757
"""
58-
And I run `wp eval 'echo getenv("DB_PREFIX");' --path={PATH}/{PROJECT}/web/wp/`
58+
And I run `wp eval 'echo $_SERVER["DB_PREFIX"];' --path={PATH}/{PROJECT}/web/wp/`
5959
Then STDOUT should be:
6060
"""
6161
foo
@@ -70,7 +70,7 @@ Feature: It can create new installs for Valet-supported WordPress projects.
7070
"""
7171
DB_HOST='127.0.0.1'
7272
"""
73-
And I run `wp eval 'echo getenv("DB_HOST");' --path={PROJECT}/web/wp/`
73+
And I run `wp eval 'echo $_SERVER["DB_HOST"];' --path={PROJECT}/web/wp/`
7474
Then STDOUT should be:
7575
"""
7676
127.0.0.1

src/Process/ShellCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,14 @@ protected function run($command, $positional = [], $assoc = [])
4949
$assoc = \WP_CLI\Utils\assoc_args_to_str($assoc);
5050
$run_command = $this->rootCommand() . " $command $positional $assoc";
5151

52-
Command::debug("Running: $run_command");
52+
Command::debug(static::class, "Running: $run_command");
5353

5454
$result = Process::create(
5555
$run_command,
5656
$this->getCwd(),
5757
$this->getEnv()
5858
)->run();
5959

60-
$result->caller = static::class;
61-
6260
Command::debug($result);
6361

6462
if ($result->return_code > 0) {

0 commit comments

Comments
 (0)