diff --git a/composer.json b/composer.json index c6de1d69..1147d983 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "require-dev": { "wp-cli/db-command": "^1.3 || ^2", - "wp-cli/wp-cli-tests": "^3.1" + "wp-cli/wp-cli-tests": "^4" }, "config": { "process-timeout": 7200, diff --git a/config-command.php b/config-command.php index fa1971fb..290f539e 100644 --- a/config-command.php +++ b/config-command.php @@ -4,7 +4,7 @@ return; } -$wpcli_config_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php'; +$wpcli_config_autoloader = __DIR__ . '/vendor/autoload.php'; if ( file_exists( $wpcli_config_autoloader ) ) { require_once $wpcli_config_autoloader; } diff --git a/src/Config_Command.php b/src/Config_Command.php index 0c166646..95a486ed 100644 --- a/src/Config_Command.php +++ b/src/Config_Command.php @@ -466,7 +466,6 @@ public function is_true( $args, $assoc_args ) { WP_CLI::halt( 0 ); } WP_CLI::halt( 1 ); - } /** @@ -857,21 +856,20 @@ public function shuffle_salts( $args, $assoc_args ) { } WP_CLI::success( 'Shuffled the salt keys.' ); - } /** * Filters wp-config.php file configurations. * - * @param array $list + * @param array $vars * @param array $previous_list * @param string $type * @param array $exclude_list * @return array */ - private static function get_wp_config_diff( $list, $previous_list, $type, $exclude_list = [] ) { + private static function get_wp_config_diff( $vars, $previous_list, $type, $exclude_list = [] ) { $result = []; - foreach ( $list as $name => $val ) { + foreach ( $vars as $name => $val ) { if ( array_key_exists( $name, $previous_list ) || in_array( $name, $exclude_list, true ) ) { continue; }