Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Update php to 8.0 and laravel to be 8 or higher #1226

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 5 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -10,38 +10,15 @@ jobs:
max-parallel: 3
matrix:
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
analysis: [ false ]
coverage: [ 'none' ]
- '8.1'
analysis: [ true ]
coverage: [ 'xdebug' ]
normalize: [ false ]
validate: [ false ]
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 }}

6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -24,12 +24,12 @@
}
],
"require": {
"php": ">=7.2",
"php": ">=8.0",
"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",
24 changes: 13 additions & 11 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -22,20 +22,22 @@

abstract class TestCase extends OrchestraTestCase
{
/**
* Fixes the issue with test bench core.
* */
public static $latestResponse = null;
/**
* User model.
*
* @var ShopModel
*/
protected $model;

/**
* Token creation defaults.
*
* @var array
*/
protected $tokenDefaults;

/**
* Carbon time.
*
@@ -71,6 +73,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 +110,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