Skip to content

Commit

Permalink
Merge pull request #116 from wp-cli/fix/wpcs-3.0-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Aug 30, 2023
2 parents 967e9d9 + 5869f9f commit 7ae0201
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions checksum-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
return;
}

$wpcli_checksum_autoloader = dirname( __FILE__ ) . '/vendor/autoload.php';
$wpcli_checksum_autoloader = __DIR__ . '/vendor/autoload.php';
if ( file_exists( $wpcli_checksum_autoloader ) ) {
require_once $wpcli_checksum_autoloader;
}
Expand All @@ -14,4 +14,3 @@

WP_CLI::add_command( 'plugin', 'Plugin_Command_Namespace' );
WP_CLI::add_command( 'plugin verify-checksums', 'Checksum_Plugin_Command' );

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/Checksum_Plugin_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ public function __invoke( $args, $assoc_args ) {
$version = empty( $version_arg ) ? $this->get_plugin_version( $plugin->file ) : $version_arg;

if ( in_array( $plugin->name, $exclude_list, true ) ) {
$skips++;
++$skips;
continue;
}

if ( false === $version ) {
WP_CLI::warning( "Could not retrieve the version for plugin {$plugin->name}, skipping." );
$skips++;
++$skips;
continue;
}

Expand All @@ -122,7 +122,7 @@ public function __invoke( $args, $assoc_args ) {

if ( false === $checksums ) {
WP_CLI::warning( "Could not retrieve the checksums for version {$version} of plugin {$plugin->name}, skipping." );
$skips++;
++$skips;
continue;
}

Expand Down
1 change: 0 additions & 1 deletion src/WP_CLI/Fetchers/UnfilteredPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,3 @@ public function get( $name ) {
return false;
}
}

0 comments on commit 7ae0201

Please sign in to comment.