Skip to content

Commit

Permalink
Merge pull request #419 from WordPress/try/rename-plugin-file
Browse files Browse the repository at this point in the history
Rename main plugin file name to match v0.2.3
  • Loading branch information
swissspidy authored Feb 9, 2024
2 parents 1f0ceeb + c55add9 commit c82b335
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
}

if ( ! isset( $context ) ) {
$context = new Plugin_Context( __DIR__ . '/plugin-check.php' );
$context = new Plugin_Context( __DIR__ . '/plugin.php' );
}

// Create the CLI command instance and add to WP CLI.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function filter_active_plugins( $active_plugins ) {
$plugin_check_file = WP_PLUGIN_CHECK_MAIN_FILE;
} else {
$plugins_dir = defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins';
$plugin_check_file = $plugins_dir . '/plugin-check/plugin-check.php';
$plugin_check_file = $plugins_dir . '/plugin-check/plugin.php';
}

$plugin_base_file = plugin_basename( $plugin_check_file );
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<arg name="extensions" value="php"/>

<file>./cli.php</file>
<file>./plugin-check.php</file>
<file>./plugin.php</file>
<file>./includes</file>
<file>./tests/phpunit</file>

Expand Down
4 changes: 2 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
parameters:
level: 5
paths:
- plugin-check.php
- plugin.php
- includes/
bootstrapFiles:
- tests/phpstan/bootstrap.php
scanFiles:
- plugin-check.php
- plugin.php
- tests/phpstan/stubs/wp-cli.php
- tests/phpstan/stubs/exitexception.php
- tests/phpstan/stubs/formatter.php
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<coverage processUncoveredFiles="false">
<include>
<directory suffix=".php">includes/</directory>
<file>plugin-check.php</file>
<file>plugin.php</file>
</include>
</coverage>
<testsuites>
Expand All @@ -25,7 +25,7 @@
<filter>
<whitelist processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">includes/</directory>
<file>plugin-check.php</file>
<file>plugin.php</file>
</whitelist>
</filter>
</phpunit>
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/behat/utils/maybe-generate-wp-cli-coverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

$filter = new Filter();
$filter->includeDirectory( "{$root_folder}/includes" );
$filter->includeFiles( array( "{$root_folder}/plugin-check.php" ) );
$filter->includeFiles( array( "{$root_folder}/plugin.php" ) );

$coverage = new CodeCoverage(
( new Selector() )->forLineCoverage( $filter ),
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

// Force plugin to be active.
$GLOBALS['wp_tests_options'] = array(
'active_plugins' => array( basename( TESTS_PLUGIN_DIR ) . '/plugin-check.php' ),
'active_plugins' => array( basename( TESTS_PLUGIN_DIR ) . '/plugin.php' ),
);

// Start up the WP testing environment.
Expand Down
4 changes: 2 additions & 2 deletions tests/phpunit/multisite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<coverage processUncoveredFiles="false">
<include>
<directory suffix=".php">../../includes/</directory>
<file>../../plugin-check.php</file>
<file>../../plugin.php</file>
</include>
</coverage>
<testsuites>
Expand All @@ -28,7 +28,7 @@
<filter>
<whitelist processUncoveredFilesFromWhitelist="false">
<directory suffix=".php">../../includes/</directory>
<file>../../plugin-check.php</file>
<file>../../plugin.php</file>
</whitelist>
</filter>
</phpunit>

0 comments on commit c82b335

Please sign in to comment.