@@ -44,7 +44,7 @@ class ScaffoldPackageCommand {
4444 * [--require_wp_cli=<version>]
4545 * : Required WP-CLI version for the package.
4646 * ---
47- * default: ^1.1.0
47+ * default: ^2.5
4848 * ---
4949 *
5050 * [--skip-tests]
@@ -615,35 +615,13 @@ public function package_tests( $args, $assoc_args ) {
615615 $ bin_dir = $ package_dir . 'bin/ ' ;
616616 $ utils_dir = $ package_dir . 'utils/ ' ;
617617 $ features_dir = $ package_dir . 'features/ ' ;
618- $ bootstrap_dir = $ features_dir . 'bootstrap/ ' ;
619- $ steps_dir = $ features_dir . 'steps/ ' ;
620- $ extra_dir = $ features_dir . 'extra/ ' ;
621- foreach ( array ( $ features_dir , $ bootstrap_dir , $ steps_dir , $ extra_dir , $ utils_dir , $ bin_dir ) as $ dir ) {
618+ foreach ( array ( $ features_dir , $ utils_dir , $ bin_dir ) as $ dir ) {
622619 if ( ! is_dir ( $ dir ) ) {
623620 Process::create ( Utils \esc_cmd ( 'mkdir %s ' , $ dir ) )->run ();
624621 }
625622 }
626623
627- $ wp_cli_root = WP_CLI_ROOT ;
628624 $ package_root = dirname ( dirname ( __FILE__ ) );
629- $ copy_source = array (
630- $ wp_cli_root => array (
631- 'features/bootstrap/FeatureContext.php ' => $ bootstrap_dir ,
632- 'features/bootstrap/support.php ' => $ bootstrap_dir ,
633- 'php/WP_CLI/Process.php ' => $ bootstrap_dir ,
634- 'php/WP_CLI/ProcessRun.php ' => $ bootstrap_dir ,
635- 'php/utils.php ' => $ bootstrap_dir ,
636- 'ci/behat-tags.php ' => $ utils_dir ,
637- 'features/steps/given.php ' => $ steps_dir ,
638- 'features/steps/when.php ' => $ steps_dir ,
639- 'features/steps/then.php ' => $ steps_dir ,
640- 'features/extra/no-mail.php ' => $ extra_dir ,
641- ),
642- $ package_root => array (
643- 'bin/install-package-tests.sh ' => $ bin_dir ,
644- 'bin/test.sh ' => $ bin_dir ,
645- ),
646- );
647625
648626 // Only create a sample feature file when none exist
649627 if ( ! glob ( $ features_dir . '/*.feature ' ) ) {
@@ -698,7 +676,7 @@ public function package_tests( $args, $assoc_args ) {
698676 }
699677 }
700678
701- $ force = \ WP_CLI \ Utils \get_flag_value ( $ assoc_args , 'force ' );
679+ $ force = Utils \get_flag_value ( $ assoc_args , 'force ' );
702680 $ should_write_file = $ this ->prompt_if_files_will_be_overwritten ( $ file_path , $ force );
703681 if ( ! $ should_write_file ) {
704682 continue ;
@@ -707,9 +685,6 @@ public function package_tests( $args, $assoc_args ) {
707685
708686 $ result = Process::create ( Utils \esc_cmd ( 'touch %s ' , $ file_path ) )->run ();
709687 file_put_contents ( $ file_path , $ contents );
710- if ( 'bin/install-package-tests.sh ' === $ file ) {
711- Process::create ( Utils \esc_cmd ( 'chmod +x %s ' , $ file_path ) )->run ();
712- }
713688 }
714689 }
715690
0 commit comments