Skip to content

Commit

Permalink
Fix deprecation notices (#93)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
aaemnnosttv authored Jul 22, 2024
1 parent bd38352 commit 2bc5520
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions features/valet-new-project-bedrock.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/Process/ShellCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ 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,
$this->getCwd(),
$this->getEnv()
)->run();

$result->caller = static::class;

Command::debug($result);

if ($result->return_code > 0) {
Expand Down

0 comments on commit 2bc5520

Please sign in to comment.