Skip to content

Commit 77771f4

Browse files
authored
Use the plugin name instead of mantle.php (#43)
1 parent ca866a3 commit 77771f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/InstallCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ protected function install_mantle( string $dir, InputInterface $input, OutputInt
277277
$composer = $this->find_composer();
278278
$commands = [
279279
$composer . " create-project alleyinteractive/mantle{$version} {$mantle_dir} --remove-vcs --stability=dev --no-interaction --no-scripts",
280-
"rm -rf {$mantle_dir}/docs",
280+
"mv {$mantle_dir}/mantle.php {$mantle_dir}/{$name}.php",
281281
];
282282

283283
// Setup the application for local development on the framework.
@@ -367,9 +367,9 @@ protected function get_mu_plugin_loader( string $plugin_name ): string {
367367
*/
368368
369369
if ( function_exists( 'wpcom_vip_load_plugin' ) ) {
370-
wpcom_vip_load_plugin( '$plugin_name/mantle.php' );
370+
wpcom_vip_load_plugin( '$plugin_name/$plugin_name.php' );
371371
} else {
372-
require_once WP_CONTENT_DIR . '/plugins/$plugin_name/mantle.php';
372+
require_once WP_CONTENT_DIR . '/plugins/$plugin_name/$plugin_name.php';
373373
}
374374
EOT;
375375
}

tests/InstallCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function test_install_wordpress(): void {
4747
$this->assertEquals( 0, $status_code );
4848
$this->assertDirectoryExists( "{$output}/new-site" );
4949
$this->assertFileExists( "{$output}/new-site/wp-settings.php" );
50-
$this->assertFileExists( "{$output}/new-site/wp-content/plugins/new-site/mantle.php" );
50+
$this->assertFileExists( "{$output}/new-site/wp-content/plugins/new-site/new-site.php" );
5151
$this->assertFileExists( "{$output}/new-site/wp-content/mu-plugins/new-site-loader.php" );
5252
}
5353

0 commit comments

Comments
 (0)