Skip to content

Commit 9d2e75e

Browse files
Add Laravel 12 support (#391)
* Add Laravel 12 support * Add PHP 8.4 and Laravel 12 support to CI and composer configuration * Update GitHub Actions cache to v4
1 parent 4f360b0 commit 9d2e75e

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- '8.1'
1515
- '8.2'
1616
- '8.3'
17+
- '8.4'
1718
analysis: [ false ]
1819
coverage: [ 'none' ]
1920
normalize: [ false ]
@@ -23,6 +24,7 @@ jobs:
2324
- '9.0'
2425
- '10.0'
2526
- '11.0.3'
27+
- '12.0'
2628
exclude:
2729
- php: '8.0'
2830
laravel: '9.0'
@@ -40,6 +42,8 @@ jobs:
4042
laravel: '8.22'
4143
- php: '8.3'
4244
laravel: '9.0'
45+
- php: '8.4'
46+
laravel: '12.0'
4347
include:
4448
- php: '8.0'
4549
laravel: '9.39.0'
@@ -80,7 +84,7 @@ jobs:
8084
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
8185

8286
- name: Cache composer dependencies
83-
uses: actions/cache@v2
87+
uses: actions/cache@v4
8488
with:
8589
path: ${{ steps.composer-cache.outputs.dir }}
8690
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"

composer.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@
2424
}
2525
],
2626
"require": {
27-
"php": "^8.0 || 8.1",
27+
"php": "^8.0 || ^8.1 || ^8.2 || ^8.3 || ^8.4",
2828
"ext-json": "*",
2929
"funeralzone/valueobjects": "^0.5",
3030
"jenssegers/agent": "^2.6",
31-
"laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0",
31+
"laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0 || ^12.0",
3232
"gnikyt/basic-shopify-api": "^9.0 || ^10.0 || ^11.0"
3333
},
3434
"require-dev": {
3535
"laravel/legacy-factories": "^v1.3.0",
3636
"ergebnis/composer-normalize": "^2.8",
3737
"friendsofphp/php-cs-fixer": "^3.0",
3838
"mockery/mockery": "^1.0",
39-
"orchestra/database": "~3.8 || ~4.0 || ~5.0 || ~6.0 || ~7.0",
40-
"orchestra/testbench": "~3.8 || ~4.0 || ~5.0 || ~6.0 || ~7.0 || ~8.0",
39+
"orchestra/database": "~3.8 || ~4.0 || ~5.0 || ~6.0 || ~7.0 || ~8.0 || ~9.0",
40+
"orchestra/testbench": "~3.8 || ~4.0 || ~5.0 || ~6.0 || ~7.0 || ~8.0 || ~9.0",
4141
"phpstan/phpstan": "^0.12",
42-
"phpunit/phpunit": "~8.0 || ^9.0 || ^10.0"
42+
"phpunit/phpunit": "~8.0 || ^9.0 || ^10.0 || ^11.0"
4343
},
4444
"config": {
4545
"sort-packages": true,

src/Http/Middleware/VerifyScopes.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private function currentScopes(ShopModel $shop): array
5959
$response = Cache::remember(
6060
$this->cacheKey($shop->getDomain()->toNative()),
6161
now()->addDay(),
62-
fn() => $shop->api()->graph('{
62+
fn () => $shop->api()->graph('{
6363
currentAppInstallation {
6464
accessScopes {
6565
handle
@@ -78,7 +78,7 @@ private function currentScopes(ShopModel $shop): array
7878
];
7979
}
8080

81-
Log::error('Fetch current app installation access scopes error: ' . json_encode(data_get($response['body']->toArray(), 'data.currentAppInstallation.userErrors')));
81+
Log::error('Fetch current app installation access scopes error: '.json_encode(data_get($response['body']->toArray(), 'data.currentAppInstallation.userErrors')));
8282

8383
return [
8484
'hasErrors' => true,

src/resources/routes/api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
Route::group([
1717
'domain' => Util::getShopifyConfig('domain'),
18-
'middleware' => ['api']
18+
'middleware' => ['api'],
1919
], function () use ($manualRoutes) {
2020
/*
2121
|--------------------------------------------------------------------------

src/resources/routes/shopify.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
Route::group([
2727
'domain' => Util::getShopifyConfig('domain'),
28-
'prefix' => Util::getShopifyConfig('prefix'),
29-
'middleware' => ['web']
28+
'prefix' => Util::getShopifyConfig('prefix'),
29+
'middleware' => ['web'],
3030
], function () use ($manualRoutes) {
3131
/*
3232
|--------------------------------------------------------------------------

0 commit comments

Comments
 (0)