Skip to content

Commit c606e43

Browse files
Fix PHP 8.2 deprecation warnings (#165)
* Fix PHP 8.2 deprication warnings This fixes the following warnings: 8192: Creation of dynamic property WP_CLI\Tests\Context\FeatureContext::$result is deprecated in /wp-cli-tests/src/Context/WhenStepDefinitions.php line 39 8192: Creation of dynamic property WP_CLI\Tests\Context\FeatureContext::$email_sends is deprecated in /wp-cli-dev/wp-cli-tests/src/Context/WhenStepDefinitions.php line 40 Which cause behat tests to fail with PHP 8.2 * Add code comments for these variables --------- Co-authored-by: Daniel Bachhuber <[email protected]>
1 parent ff44534 commit c606e43

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Context/FeatureContext.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ class FeatureContext implements SnippetAcceptingContext {
2121
use ThenStepDefinitions;
2222
use WhenStepDefinitions;
2323

24+
/**
25+
* The result of the last command run with `When I run` or `When I try`. Lives until the end of the scenario.
26+
*/
27+
private $result;
28+
29+
/**
30+
* The number of emails sent by the last command run with `When I run` or `When I try`. Lives until the end of the scenario.
31+
*/
32+
private $email_sends;
33+
2434
/**
2535
* The current working directory for scenarios that have a "Given a WP installation" or "Given an empty directory" step. Variable RUN_DIR. Lives until the end of the scenario.
2636
*/

0 commit comments

Comments
 (0)