From 881546c790441f6f85fa17e62da1f74a898e64c7 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:24:47 -0400 Subject: [PATCH 01/10] Switching to PR to test travis --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee59f93..4833c1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,5 +36,5 @@ install: - composer install -n script: - - composer run phpcs - - composer run phpunit + - composer run phpcs + - composer run phpunit From 6ae0a4d6425ab73eb0eda43bcae9c473373187f9 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:32:07 -0400 Subject: [PATCH 02/10] chmod travis --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4833c1f..240bae9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,9 +4,6 @@ sudo: false language: php -services: - - mysql - notifications: email: false @@ -33,7 +30,8 @@ before_install: fi install: - - composer install -n + - composer install -n + - chmod 755 tests/output script: - composer run phpcs From b8fe49f264be312b988da81a29d6f71984000655 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:33:35 -0400 Subject: [PATCH 03/10] Include wpcli output in test --- tests/test-install-command.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tests/test-install-command.php b/tests/test-install-command.php index 1e0c57f..92ff809 100644 --- a/tests/test-install-command.php +++ b/tests/test-install-command.php @@ -5,6 +5,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Application; use Symfony\Component\Console\Tester\CommandTester; +use Throwable; class Test_Install_Command extends TestCase { public function test_install_wordpress() { @@ -18,15 +19,20 @@ public function test_install_wordpress() { $tester = $this->get_tester(); - $status_code = $tester->execute( - [ - 'name' => [ 'new-site' ], - ], - [ - 'i', - 'f', - ] - ); + try { + $status_code = $tester->execute( + [ + 'name' => [ 'new-site' ], + ], + [ + 'i', + 'f', + ] + ); + } catch ( Throwable $e ) { + echo $tester->getDisplay( true ); + throw $e; + } $this->assertEquals( 0, $status_code ); $this->assertDirectoryExists( "{$output}/new-site" ); From f41a3e06a2cbe86831546c9f93c29ab55b31aa04 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:35:49 -0400 Subject: [PATCH 04/10] Spaces --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 240bae9..6863e41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,8 +30,8 @@ before_install: fi install: - - composer install -n - - chmod 755 tests/output + - composer install -n + - chmod 755 tests/output script: - composer run phpcs From cfca496a8d35596d579aaddd039448ae07c0db58 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:49:02 -0400 Subject: [PATCH 05/10] Adjusting name --- .editorconfig | 4 ++++ src/class-install-command.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 772841d..27c8ac4 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,7 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = tab + +[*.{js,css,scss,yml,json,.babelrc}] +indent_style = space +indent_size = 2 diff --git a/src/class-install-command.php b/src/class-install-command.php index e070cab..0c6567a 100644 --- a/src/class-install-command.php +++ b/src/class-install-command.php @@ -233,7 +233,7 @@ protected function install_mantle( string $dir, InputInterface $input, OutputInt $composer = $this->find_composer(); $commands = [ - $composer . " create-project alleyinteractive/mantle-site {$mantle_dir} --remove-vcs --stability=dev --no-interaction " + $composer . " create-project alleyinteractive/mantle {$mantle_dir} --remove-vcs --stability=dev --no-interaction " . '--repository="{\"url\": \"https://github.com/alleyinteractive/mantle-site.git\", \"type\": \"vcs\"}"', ]; From a3b4bd5c9d8e44410407230e97283682950c6822 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:49:36 -0400 Subject: [PATCH 06/10] phpcs directly --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6863e41..1178f99 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,5 +34,5 @@ install: - chmod 755 tests/output script: - - composer run phpcs + - ./vendor/bin/phpcs --standard=./phpcs.xml . - composer run phpunit From 5a0bc24334a5b9d61bb343fea8b6678e08875d13 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:53:13 -0400 Subject: [PATCH 07/10] Fixing name --- src/class-install-command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class-install-command.php b/src/class-install-command.php index 0c6567a..d69c3de 100644 --- a/src/class-install-command.php +++ b/src/class-install-command.php @@ -234,7 +234,7 @@ protected function install_mantle( string $dir, InputInterface $input, OutputInt $composer = $this->find_composer(); $commands = [ $composer . " create-project alleyinteractive/mantle {$mantle_dir} --remove-vcs --stability=dev --no-interaction " - . '--repository="{\"url\": \"https://github.com/alleyinteractive/mantle-site.git\", \"type\": \"vcs\"}"', + . '--repository="{\"url\": \"https://github.com/alleyinteractive/mantle.git\", \"type\": \"vcs\"}"', ]; $output->writeln( 'Installing Mantle...' ); From 688870b50831af806d54ae3e2b39235274fac314 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 12:55:44 -0400 Subject: [PATCH 08/10] Fixing name --- src/class-install-command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/class-install-command.php b/src/class-install-command.php index d69c3de..fe6c007 100644 --- a/src/class-install-command.php +++ b/src/class-install-command.php @@ -233,7 +233,7 @@ protected function install_mantle( string $dir, InputInterface $input, OutputInt $composer = $this->find_composer(); $commands = [ - $composer . " create-project alleyinteractive/mantle {$mantle_dir} --remove-vcs --stability=dev --no-interaction " + $composer . " create-project alleyinteractive/mantle-site {$mantle_dir} --remove-vcs --stability=dev --no-interaction " . '--repository="{\"url\": \"https://github.com/alleyinteractive/mantle.git\", \"type\": \"vcs\"}"', ]; From 684373426c6141163f51246c1fa27fe267abaf51 Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 13:00:15 -0400 Subject: [PATCH 09/10] Debugging phpcs --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1178f99..a2d55ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,5 +34,7 @@ install: - chmod 755 tests/output script: - - ./vendor/bin/phpcs --standard=./phpcs.xml . + - | + ./vendor/bin/phpcs --config-set installed_paths ../../alley,../../wp-coding-standards/wpcs,../../sirbrillig/phpcs-variable-analysis,../../automattic/vipwpcs + ./vendor/bin/phpcs --standard=./phpcs.xml . - composer run phpunit From ef1c917ac26527008d66fd19a8a92433d29ff2ac Mon Sep 17 00:00:00 2001 From: Sean Fisher Date: Mon, 5 Oct 2020 13:07:19 -0400 Subject: [PATCH 10/10] phpcs fixes --- .travis.yml | 4 +--- phpcs.xml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2d55ea..6863e41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,5 @@ install: - chmod 755 tests/output script: - - | - ./vendor/bin/phpcs --config-set installed_paths ../../alley,../../wp-coding-standards/wpcs,../../sirbrillig/phpcs-variable-analysis,../../automattic/vipwpcs - ./vendor/bin/phpcs --standard=./phpcs.xml . + - composer run phpcs - composer run phpunit diff --git a/phpcs.xml b/phpcs.xml index cb22fd0..257f2e2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -4,5 +4,5 @@ tests/ - +