You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -342,8 +410,8 @@ function delete_files( string|array $paths ) {
342
410
remove_assets_buddy();
343
411
}
344
412
345
-
if ( confirm( 'Will this plugin be using Composer? (WordPress Composer Autoloader already included!)', true ) ) {
346
-
$uses_composer= true;
413
+
if ( confirm( 'Will this plugin be using Composer? (WordPress Composer Autoloader already included! phpcs and phpunit also rely on Composer being installed for testing.)', true ) ) {
414
+
$uses_composer = true;
347
415
$needs_built_assets = true;
348
416
349
417
if ( confirm( 'Do you want to run `composer install`?', true ) ) {
@@ -368,7 +436,9 @@ function delete_files( string|array $paths ) {
368
436
$standalone = true;
369
437
370
438
// Check if the plugin will be use standalone (as a single repository) or as a
371
-
// part of larger project (such as a wp-content-rooted project).
439
+
// part of larger project (such as a wp-content-rooted project). Assumes that
440
+
// the parent project is located at /wp-content/ and this plugin is located at
441
+
// /wp-content/plugins/:plugin/.
372
442
if (
373
443
file_exists( '../../.git/index' )
374
444
&& ! confirm(
@@ -417,6 +487,31 @@ function delete_files( string|array $paths ) {
417
487
echo"\n\n";
418
488
}
419
489
}
490
+
491
+
$parent_files = [
492
+
$parent_folder . '/phpcs.xml',
493
+
$parent_folder . '/phpcs.xml.dist',
494
+
$parent_folder . '/.phpcs.xml',
495
+
];
496
+
497
+
if ( file_exists( __DIR__ . '/.phpcs.xml' ) ) {
498
+
foreach ( $parent_filesas$parent_file ) {
499
+
if ( ! file_exists( $parent_file ) ) {
500
+
continue;
501
+
}
502
+
503
+
if ( confirm( "Do you want to roll up the phpcs configuration to the parent? (This will change the plugin's phpcs configuration to inherit the parent configuration from {$parent_file}.)" ) ) {
0 commit comments