From afcc5f4af23530197c102042bd5f957c615428ce Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Wed, 30 Aug 2023 15:19:29 +0200 Subject: [PATCH 1/2] Update to wp-cli-tests v4 (which requires WPCS v3) --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f03b3bf4..51f16e08 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ }, "require-dev": { "wp-cli/extension-command": "^1.2 || ^2", - "wp-cli/wp-cli-tests": "^3.1" + "wp-cli/wp-cli-tests": "^4" }, "config": { "process-timeout": 7200, From a638015672d80b0ab4cbba8eff7341f02d18fed8 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Wed, 30 Aug 2023 15:25:01 +0200 Subject: [PATCH 2/2] Fix all autofixable CS issues --- scaffold-command.php | 2 +- src/Scaffold_Command.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/scaffold-command.php b/scaffold-command.php index 0d010247..a2b0f501 100644 --- a/scaffold-command.php +++ b/scaffold-command.php @@ -4,7 +4,7 @@ return; } -$wpcli_scaffold_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php'; +$wpcli_scaffold_autoloader = __DIR__ . '/vendor/autoload.php'; if ( file_exists( $wpcli_scaffold_autoloader ) ) { require_once $wpcli_scaffold_autoloader; } diff --git a/src/Scaffold_Command.php b/src/Scaffold_Command.php index e58933c8..d32e3c76 100644 --- a/src/Scaffold_Command.php +++ b/src/Scaffold_Command.php @@ -1085,7 +1085,6 @@ protected function maybe_create_themes_dir() { if ( ! is_dir( $themes_dir ) ) { wp_mkdir_p( $themes_dir ); } - } /** @@ -1096,7 +1095,6 @@ protected function maybe_create_plugins_dir() { if ( ! is_dir( WP_PLUGIN_DIR ) ) { wp_mkdir_p( WP_PLUGIN_DIR ); } - } /** @@ -1113,7 +1111,7 @@ protected function init_wp_filesystem() { * Localizes the template path. */ private static function mustache_render( $template, $data = [] ) { - return Utils\mustache_render( dirname( dirname( __FILE__ ) ) . "/templates/{$template}", $data ); + return Utils\mustache_render( dirname( __DIR__ ) . "/templates/{$template}", $data ); } /**