Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"wp-cli/db-command": "^1.3 || ^2",
"wp-cli/entity-command": "^1.3 || ^2",
"wp-cli/extension-command": "^1.2 || ^2",
"wp-cli/wp-cli-tests": "^3.2.7"
"wp-cli/wp-cli-tests": "^4"
},
"config": {
"process-timeout": 7200,
Expand Down
2 changes: 1 addition & 1 deletion core-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
return;
}

$wpcli_core_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
$wpcli_core_autoloader = __DIR__ . '/vendor/autoload.php';
if ( file_exists( $wpcli_core_autoloader ) ) {
require_once $wpcli_core_autoloader;
}
Expand Down
21 changes: 12 additions & 9 deletions src/Core_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,14 @@ private function multisite_convert_( $assoc_args ) {
}

// copied from populate_network()
private static function create_initial_blog( $network_id, $blog_id, $domain, $path,
$subdomain_install, $site_user ) {
private static function create_initial_blog(
$network_id,
$blog_id,
$domain,
$path,
$subdomain_install,
$site_user
) {
global $wpdb, $current_site, $wp_rewrite;

// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- This is meant to replace Core functionality.
Expand Down Expand Up @@ -1138,10 +1144,8 @@ public function update( $args, $assoc_args ) {
WP_CLI::success( 'WordPress is at the latest minor release.' );
return;
}
} else {
if ( ! empty( $from_api->updates ) ) {
} elseif ( ! empty( $from_api->updates ) ) {
list( $update ) = $from_api->updates;
}
}
} elseif ( Utils\wp_version_compare( $assoc_args['version'], '<' )
|| 'nightly' === $assoc_args['version']
Expand Down Expand Up @@ -1262,7 +1266,7 @@ public function update_db( $args, $assoc_args ) {
$total = 0;
$site_ids = [];
foreach ( $it as $blog ) {
$total++;
++$total;
$site_ids[] = $blog->site_id;
$url = $blog->domain . $blog->path;
$cmd = "--url={$url} core update-db";
Expand All @@ -1285,7 +1289,7 @@ public function update_db( $args, $assoc_args ) {
$message = "Database upgraded successfully on {$url}";
}
WP_CLI::log( $message );
$success++;
++$success;
} else {
WP_CLI::warning( "Database failed to upgrade on {$url}" );
}
Expand Down Expand Up @@ -1506,7 +1510,7 @@ private function cleanup_extra_files( $version_from, $version_to, $locale, $inse
if ( file_exists( ABSPATH . $file ) ) {
unlink( ABSPATH . $file );
WP_CLI::log( "File removed: {$file}" );
$count++;
++$count;
}
}

Expand Down Expand Up @@ -1562,5 +1566,4 @@ function () use ( $new_zip_file ) {
WP_CLI::error( 'ZipArchive failed to open ZIP file.' );
}
}

}
1 change: 0 additions & 1 deletion src/WP_CLI/Core/NonDestructiveCoreUpgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ public function unpack_package( $package, $delete_package = false ) {
return parent::unpack_package( $package, $delete_package );
}
}