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, 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 ); } /**