Skip to content

Commit ee894b2

Browse files
committed
Merge branch 'master' into replace_rest_with_graphql_for_theme_level_support
2 parents 917cb23 + 1a1bbb5 commit ee894b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+651
-1079
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,26 @@ jobs:
1010
max-parallel: 3
1111
matrix:
1212
php:
13-
- '8.0'
1413
- '8.1'
1514
- '8.2'
1615
- '8.3'
16+
- '8.4'
1717
analysis: [ false ]
1818
coverage: [ 'none' ]
1919
normalize: [ false ]
2020
validate: [ false ]
2121
laravel:
22-
- '8.22'
23-
- '9.0'
24-
- '10.0'
25-
- '11.0.3'
22+
- '10.48.29'
23+
- '11.45.1'
24+
- '12.19.3'
2625
exclude:
27-
- php: '8.0'
28-
laravel: '9.0'
29-
- php: '8.0'
30-
laravel: '10.0'
3126
- php: '8.1'
32-
laravel: '8.22'
27+
laravel: '11.45.1'
3328
- php: '8.1'
34-
laravel: '9.0'
35-
- php: '8.2'
36-
laravel: '8.22'
37-
- php: '8.2'
38-
laravel: '9.0'
39-
- php: '8.3'
40-
laravel: '8.22'
41-
- php: '8.3'
42-
laravel: '9.0'
29+
laravel: '12.19.3'
4330
include:
44-
- php: '8.0'
45-
laravel: '9.39.0'
31+
- php: '8.1'
32+
laravel: '10.48.29'
4633
analysis: true
4734
coverage: 'xdebug'
4835
normalize: true
@@ -65,9 +52,6 @@ jobs:
6552
if: matrix.validate == true
6653
run: composer validate --strict
6754

68-
- name: Install Laravel legacy factories support
69-
if: matrix.laravel != '7.0'
70-
run: composer require "laravel/legacy-factories:^1.1" --dev --no-interaction --no-update
7155

7256
#- name: Install Laravel and Orchestra Testbench
7357
# run: composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update
@@ -80,7 +64,7 @@ jobs:
8064
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
8165

8266
- name: Cache composer dependencies
83-
uses: actions/cache@v2
67+
uses: actions/cache@v4
8468
with:
8569
path: ${{ steps.composer-cache.outputs.dir }}
8670
key: "php-${{ matrix.php }}-laravel-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }}"
@@ -90,14 +74,13 @@ jobs:
9074
run: composer install --prefer-dist --no-progress
9175

9276
- name: Normalize composer file
93-
if: matrix.normalize == true && matrix.php != '8.0'
77+
if: matrix.normalize == true
9478
run: composer normalize --dry-run
9579

9680
- name: Run test suite
97-
run: vendor/bin/phpunit -v
81+
run: vendor/bin/phpunit
9882

9983
- name: Run static code analysis
100-
if: matrix.analysis == true
10184
run: vendor/bin/phpstan --memory-limit=-1
10285

10386
- name: Upload coverage results

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ jobs:
3131
composer install --no-interaction --prefer-dist
3232
3333
- name: Check for code style violation with PHP-CS-Fixer
34-
run: vendor/bin/php-cs-fixer fix --diff
34+
run: vendor/bin/php-cs-fixer check

.idea/laravel-shopify.iml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.phpunit.cache/test-results

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

composer.json

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "kyon147/laravel-shopify",
33
"description": "Shopify package for Laravel to aide in app development",
4+
"license": "MIT",
45
"keywords": [
56
"api",
67
"callback-url",
@@ -16,36 +17,52 @@
1617
"shopify-app",
1718
"webhook"
1819
],
19-
"license": "MIT",
2020
"authors": [
2121
{
2222
"name": "Luke (Kyon147)",
2323
"email": "[email protected]"
2424
}
2525
],
26+
"support": {
27+
"issues": "https://github.com/Kyon147/laravel-shopify/issues",
28+
"forum": "https://github.com/Kyon147/laravel-shopify/discussions",
29+
"wiki": "https://github.com/Kyon147/laravel-shopify/wiki",
30+
"source": "https://github.com/Kyon147/laravel-shopify"
31+
},
2632
"require": {
27-
"php": "^8.0 || 8.1",
33+
"php": ">=8.1",
2834
"ext-json": "*",
2935
"funeralzone/valueobjects": "^0.5",
36+
"gnikyt/basic-shopify-api": "^11.0",
3037
"jenssegers/agent": "^2.6",
31-
"laravel/framework": "^8.0 || ^9.0 || ^10.0 || ^11.0",
32-
"gnikyt/basic-shopify-api": "^9.0 || ^10.0 || ^11.0"
38+
"laravel/framework": "^10.0 || ^11.0 || ^12.0"
3339
},
3440
"require-dev": {
35-
"laravel/legacy-factories": "^v1.3.0",
3641
"ergebnis/composer-normalize": "^2.8",
3742
"friendsofphp/php-cs-fixer": "^3.0",
43+
"laravel/legacy-factories": "^1.3.0",
3844
"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",
41-
"phpstan/phpstan": "^0.12",
42-
"phpunit/phpunit": "~8.0 || ^9.0 || ^10.0"
45+
"orchestra/testbench": "^8.0 || ^9.0",
46+
"phpstan/phpstan": "^2.1",
47+
"phpunit/phpunit": "^8.0 || ^9.0 || ^10.0 || ^11.0"
48+
},
49+
"minimum-stability": "dev",
50+
"prefer-stable": true,
51+
"autoload": {
52+
"psr-4": {
53+
"Osiset\\ShopifyApp\\": "src/"
54+
}
55+
},
56+
"autoload-dev": {
57+
"psr-4": {
58+
"Osiset\\ShopifyApp\\Test\\": "tests/"
59+
}
4360
},
4461
"config": {
45-
"sort-packages": true,
4662
"allow-plugins": {
4763
"ergebnis/composer-normalize": true
48-
}
64+
},
65+
"sort-packages": true
4966
},
5067
"extra": {
5168
"laravel": {
@@ -54,28 +71,10 @@
5471
]
5572
}
5673
},
57-
"autoload": {
58-
"psr-4": {
59-
"Osiset\\ShopifyApp\\": "src/"
60-
}
61-
},
62-
"autoload-dev": {
63-
"psr-4": {
64-
"Osiset\\ShopifyApp\\Test\\": "tests/"
65-
}
66-
},
67-
"minimum-stability": "dev",
68-
"prefer-stable": true,
6974
"scripts": {
7075
"lint": "vendor/bin/php-cs-fixer fix",
7176
"test": "vendor/bin/phpunit",
7277
"test-html-cov": "vendor/bin/phpunit --coverage-html ./build/html/",
7378
"test-no-cov": "vendor/bin/phpunit --no-coverage"
74-
},
75-
"support": {
76-
"issues": "https://github.com/Kyon147/laravel-shopify/issues",
77-
"forum": "https://github.com/Kyon147/laravel-shopify/discussions",
78-
"wiki": "https://github.com/Kyon147/laravel-shopify/wiki",
79-
"source": "https://github.com/Kyon147/laravel-shopify"
8079
}
8180
}

ignore-by-php-version.neon.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PHPStan\DependencyInjection\NeonAdapter;
6+
7+
$adapter = new NeonAdapter();
8+
9+
$config = [];
10+
11+
12+
if (PHP_VERSION_ID >= 80408) {
13+
$config = array_merge_recursive($config, $adapter->load(__DIR__.'/phpstan-baseline-84.neon'));
14+
}
15+
16+
if (PHP_VERSION_ID < 80408) {
17+
$config = array_merge_recursive($config, $adapter->load(__DIR__.'/phpstan-baseline-81.neon'));
18+
}
19+
20+
return $config;

phpstan-baseline-81.neon

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Variable \$queryString on left side of \?\? always exists and is not nullable\.$#'
5+
identifier: nullCoalesce.variable
6+
count: 1
7+
path: src/Util.php

phpstan-baseline-84.neon

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
parameters:
2+
ignoreErrors:
3+
-
4+
message: '#^Deprecated in PHP 8\.4\: Parameter \#1 \$session \(Gnikyt\\BasicShopifyAPI\\Session\) is implicitly nullable via default value null\.$#'
5+
identifier: parameter.implicitlyNullable
6+
count: 1
7+
path: src/Contracts/ApiHelper.php
8+
9+
-
10+
message: '#^Deprecated in PHP 8\.4\: Parameter \#1 \$session \(Gnikyt\\BasicShopifyAPI\\Session\) is implicitly nullable via default value null\.$#'
11+
identifier: parameter.implicitlyNullable
12+
count: 2
13+
path: src/Services/ApiHelper.php
14+
15+
-
16+
message: '#^Deprecated in PHP 8\.4\: Parameter \#3 \$payload \(array\) is implicitly nullable via default value null\.$#'
17+
identifier: parameter.implicitlyNullable
18+
count: 1
19+
path: src/Services/ApiHelper.php
20+
21+
-
22+
message: '#^Deprecated in PHP 8\.4\: Parameter \#2 \$delimiter \(string\) is implicitly nullable via default value null\.$#'
23+
identifier: parameter.implicitlyNullable
24+
count: 1
25+
path: src/Util.php
26+
27+
-
28+
message: '#^Variable \$queryString on left side of \?\? always exists and is not nullable\.$#'
29+
identifier: nullCoalesce.variable
30+
count: 1
31+
path: src/Util.php
32+
33+
-
34+
message: '#^Deprecated in PHP 8\.4\: Parameter \#3 \$params \(array\) is implicitly nullable via default value null\.$#'
35+
identifier: parameter.implicitlyNullable
36+
count: 1
37+
path: tests/Stubs/Api.php
38+
39+
-
40+
message: '#^Deprecated in PHP 8\.4\: Parameter \#2 \$requestInstance \(Illuminate\\Http\\Request\) is implicitly nullable via default value null\.$#'
41+
identifier: parameter.implicitlyNullable
42+
count: 1
43+
path: tests/TestCase.php
44+
45+
-
46+
message: '#^Deprecated in PHP 8\.4\: Parameter \#3 \$cb \(Closure\) is implicitly nullable via default value null\.$#'
47+
identifier: parameter.implicitlyNullable
48+
count: 1
49+
path: tests/TestCase.php

phpstan.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
includes:
2+
- ignore-by-php-version.neon.php
3+
14
parameters:
25
level: 1
36
paths:

phpunit.xml.dist

Lines changed: 25 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.0/phpunit.xsd"
4-
backupGlobals="false"
5-
backupStaticAttributes="false"
6-
colors="true"
7-
convertErrorsToExceptions="true"
8-
convertNoticesToExceptions="true"
9-
convertWarningsToExceptions="true"
10-
processIsolation="false"
11-
stopOnError="true"
12-
stopOnFailure="true"
13-
stopOnIncomplete="false"
14-
stopOnSkipped="false"
15-
verbose="false"
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
5+
backupGlobals="false"
6+
colors="true"
7+
processIsolation="false"
8+
stopOnError="true"
9+
stopOnFailure="true"
10+
stopOnIncomplete="false"
11+
stopOnSkipped="false"
12+
cacheDirectory=".phpunit.cache"
13+
backupStaticProperties="false"
1614
>
17-
<coverage>
15+
<testsuites>
16+
<testsuite name="Laravel Shopify Test Suite">
17+
<directory>tests</directory>
18+
</testsuite>
19+
</testsuites>
20+
<logging />
21+
<php>
22+
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF" />
23+
<env name="SHOPIFY_API_KEY" value="00000000000000000000000000000000" />
24+
<env name="SHOPIFY_API_SECRET" value="00000000000000000000000000000000" />
25+
</php>
26+
<source>
1827
<include>
1928
<directory suffix=".php">src/</directory>
2029
</include>
@@ -26,20 +35,5 @@
2635
<directory>src/Messaging/Events/</directory>
2736
<file>src/ShopifyAppProvider.php</file>
2837
</exclude>
29-
<report>
30-
<clover outputFile="build/logs/clover.xml"/>
31-
<text outputFile="php://stdout"/>
32-
</report>
33-
</coverage>
34-
<testsuites>
35-
<testsuite name="Laravel Shopify Test Suite">
36-
<directory>tests</directory>
37-
</testsuite>
38-
</testsuites>
39-
<logging/>
40-
<php>
41-
<env name="APP_KEY" value="AckfSECXIvnK5r28GVIWUAxmbBSjTsmF"/>
42-
<env name="SHOPIFY_API_KEY" value="00000000000000000000000000000000"/>
43-
<env name="SHOPIFY_API_SECRET" value="00000000000000000000000000000000"/>
44-
</php>
38+
</source>
4539
</phpunit>

0 commit comments

Comments
 (0)