From 559816513123bd53be06ab2fd27d78bbc8afac4c Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Sat, 1 Oct 2022 11:16:44 +0100 Subject: [PATCH 1/6] Update php to 8.1 and laravel to be 8 or higher --- .github/workflows/ci.yml | 36 ++++++------------------------------ composer.json | 6 +++--- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48c7c439..59963d89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,38 +10,14 @@ jobs: max-parallel: 3 matrix: php: - - '7.2' - - '7.3' - - '7.4' - - '8.0' - analysis: [ false ] - coverage: [ 'none' ] - normalize: [ false ] - validate: [ false ] + - '8.1' + analysis: [ true ] + coverage: [ 'xdebug' ] + normalize: [ true ] + validate: [ true ] laravel: - - '7.0' - - '8.22' + - '8.83' - '9.0' - exclude: - - php: '7.2' - laravel: '8.22' - - php: '7.2' - laravel: '9.0' - - php: '7.3' - laravel: '9.0' - - php: '7.4' - laravel: '9.0' - - php: '8.0' - laravel: '7.0' - - php: '8.0' - laravel: '9.0' - include: - - php: '8.0' - laravel: '9.0' - analysis: true - coverage: 'xdebug' - normalize: true - validate: true name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }} diff --git a/composer.json b/composer.json index f5feb1d3..fb6f846a 100644 --- a/composer.json +++ b/composer.json @@ -24,12 +24,12 @@ } ], "require": { - "php": ">=7.2", + "php": ">=8.1", "ext-json": "*", "funeralzone/valueobjects": "^0.5", "jenssegers/agent": "^2.6", - "laravel/framework": "^7.0 || ^8.0 || ^9.0", - "osiset/basic-shopify-api": "^9.0 || <=10.0.5" + "laravel/framework": "^8.0 || ^9.0", + "osiset/basic-shopify-api": "^9.0 || ^10.0.6" }, "require-dev": { "ergebnis/composer-normalize": "^2.8", From c267e4e180d5ee293fca782480e841ec54f8b59c Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Sat, 1 Oct 2022 11:23:33 +0100 Subject: [PATCH 2/6] dont normalise --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59963d89..dffa5cd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: - '8.1' analysis: [ true ] coverage: [ 'xdebug' ] - normalize: [ true ] + normalize: [ false ] validate: [ true ] laravel: - '8.83' From 6a806d0e3f6dbdae5f3b4cb1f68aa61df98cada4 Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Sat, 1 Oct 2022 11:25:41 +0100 Subject: [PATCH 3/6] testbench core fix --- tests/TestCase.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index a2b8a2ce..88cf66ea 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -22,13 +22,13 @@ abstract class TestCase extends OrchestraTestCase { + public static $latestResponse = null; /** * User model. * * @var ShopModel */ protected $model; - /** * Token creation defaults. * @@ -36,6 +36,9 @@ abstract class TestCase extends OrchestraTestCase */ protected $tokenDefaults; + /* + * Fixes the issue with test bench core. + * */ /** * Carbon time. * @@ -71,6 +74,15 @@ public function setUp(): void ]; } + protected function setupDatabase($app): void + { + // Run Laravel migrations + $this->loadLaravelMigrations(); + + // Run package migration + $this->artisan('migrate')->run(); + } + protected function getPackageProviders($app): array { // ConsoleServiceProvider required to make migrations work @@ -99,15 +111,6 @@ protected function getEnvironmentSetUp($app): void $app['config']->set('logging.deprecations', 'errorlog'); } - protected function setupDatabase($app): void - { - // Run Laravel migrations - $this->loadLaravelMigrations(); - - // Run package migration - $this->artisan('migrate')->run(); - } - protected function swapEnvironment(string $env, Closure $fn): void { // Get the current environment From 4d50a1849776647ef4153954bf5236584cfe2944 Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Sat, 1 Oct 2022 11:26:58 +0100 Subject: [PATCH 4/6] Linting --- tests/TestCase.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 88cf66ea..aadcd889 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -22,6 +22,9 @@ abstract class TestCase extends OrchestraTestCase { + /** + * Fixes the issue with test bench core. + * */ public static $latestResponse = null; /** * User model. @@ -35,10 +38,6 @@ abstract class TestCase extends OrchestraTestCase * @var array */ protected $tokenDefaults; - - /* - * Fixes the issue with test bench core. - * */ /** * Carbon time. * From ca4c8692e70903747d04f68016717ac6d9c02349 Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Sat, 1 Oct 2022 11:38:59 +0100 Subject: [PATCH 5/6] 8.0 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dffa5cd5..73e24c71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ jobs: max-parallel: 3 matrix: php: + - '8.0' - '8.1' analysis: [ true ] coverage: [ 'xdebug' ] From e0d917e92e32fef70ea9d5b568fa70553669f85e Mon Sep 17 00:00:00 2001 From: Luke Walsh Date: Sat, 1 Oct 2022 11:41:41 +0100 Subject: [PATCH 6/6] Composer 8.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fb6f846a..cb91255e 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ } ], "require": { - "php": ">=8.1", + "php": ">=8.0", "ext-json": "*", "funeralzone/valueobjects": "^0.5", "jenssegers/agent": "^2.6",