Skip to content

Commit 3622e4d

Browse files
Merge pull request #11 from laravel-shift/l12-compatibility
Laravel 12.x Compatibility
2 parents cd887ea + 36e352c commit 3622e4d

File tree

2 files changed

+98
-16
lines changed

2 files changed

+98
-16
lines changed

.github/workflows/main.yml

Lines changed: 91 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,49 @@ name: Build
22

33
on:
44
push:
5-
paths-ignore: ["*.md"]
5+
paths-ignore:
6+
- *.md
67
pull_request:
7-
paths-ignore: ["*.md"]
8-
branches: [main]
8+
paths-ignore:
9+
- *.md
10+
branches:
11+
- main
912

1013
jobs:
1114
analysis:
15+
16+
1217
runs-on: ubuntu-latest
18+
19+
20+
1321
strategy:
1422
matrix:
15-
php: [8.3]
23+
php: ['8.2', 8.3, '8.3', '8.4']
24+
25+
26+
1627
steps:
1728
- uses: actions/checkout@v4
29+
30+
31+
1832
- name: Setup PHP
1933
uses: shivammathur/setup-php@v2
2034
with:
2135
php-version: ${{ matrix.php }}
2236
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
2337
coverage: none
38+
39+
40+
2441
- name: Get Composer Cache Directory
2542
id: composer-cache
2643
run: |
2744
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
45+
46+
47+
2848
- name: Cache composer dependencies
2949
uses: actions/cache@v4
3050
env:
@@ -34,30 +54,57 @@ jobs:
3454
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
3555
restore-keys: |
3656
php-${{ matrix.php }}-build-${{ env.cache-name }}-
57+
58+
59+
3760
- name: Install composer dependencies
3861
run: composer install --no-interaction --prefer-dist
62+
63+
64+
3965
- name: Run static analysis
4066
run: composer analyse
67+
4168
test:
4269
name: Test (PHP ${{ matrix.php }})
43-
needs: [analysis]
70+
71+
72+
needs:
73+
- analysis
74+
75+
4476
runs-on: ubuntu-latest
77+
78+
79+
4580
strategy:
4681
matrix:
4782
php: [8.0, 8.1, 8.2]
83+
84+
85+
4886
steps:
4987
- name: Checkout repository
5088
uses: actions/checkout@v4
89+
90+
91+
5192
- name: Set up PHP
5293
uses: shivammathur/setup-php@v2
5394
with:
5495
php-version: ${{ matrix.php }}
5596
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
5697
coverage: none
98+
99+
100+
57101
- name: Get Composer Cache Directory
58102
id: composer-cache
59103
run: |
60104
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
105+
106+
107+
61108
- name: Cache composer dependencies
62109
uses: actions/cache@v4
63110
env:
@@ -67,41 +114,76 @@ jobs:
67114
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
68115
restore-keys: |
69116
php-${{ matrix.php }}-build-${{ env.cache-name }}-
117+
118+
119+
70120
- name: Install composer dependencies
71121
run: composer install --no-interaction --prefer-dist
122+
123+
124+
72125
- name: Run PHPUnit tests
73126
run: vendor/bin/phpunit
127+
74128
test-coverage:
75129
name: Test (PHP ${{ matrix.php }})
76-
needs: [analysis]
130+
131+
132+
needs:
133+
- analysis
134+
135+
77136
runs-on: ubuntu-latest
137+
138+
139+
78140
strategy:
79141
matrix:
80-
php: [8.3]
142+
php: ['8.2', 8.3, '8.3', '8.4']
143+
144+
145+
81146
steps:
82147
- name: Checkout repository
83148
uses: actions/checkout@v4
149+
150+
151+
84152
- name: Set up PHP
85153
uses: shivammathur/setup-php@v2
86154
with:
87155
php-version: ${{ matrix.php }}
88156
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
157+
158+
159+
89160
- name: Get Composer Cache Directory
90161
id: composer-cache
91162
run: |
92163
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
164+
165+
166+
93167
- name: Cache composer dependencies
94168
uses: actions/cache@v4
95169
env:
96170
cache-name: laravel-gcr-worker-test
97171
with:
98172
path: ${{ steps.composer-cache.outputs.dir }}
99173
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
100-
restore-keys: |
101-
php-${{ matrix.php }}-build-${{ env.cache-name }}-
174+
restore-keys: php-${{ matrix.php }}-build-${{ env.cache-name }}-
175+
176+
177+
102178
- name: Install composer dependencies
103179
run: composer install --no-interaction --prefer-dist
180+
181+
182+
104183
- name: Run PHPUnit tests and generate code coverage
105184
run: vendor/bin/phpunit --coverage-clover=clover.xml
185+
186+
187+
106188
- name: Upload code coverage results
107189
run: bash <(curl -s https://codecov.io/bash)

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,19 @@
2020
},
2121
"require": {
2222
"php": "^8.0",
23-
"illuminate/console": "^8.0|^9.0|^10.0|^11.0",
24-
"illuminate/queue": "^8.0|^9.0|^10.0|^11.0",
25-
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
23+
"illuminate/console": "^8.0|^9.0|^10.0|^11.0|^12.0",
24+
"illuminate/queue": "^8.0|^9.0|^10.0|^11.0|^12.0",
25+
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
2626
"kainxspirits/laravel-pubsub-queue": "^0.6|^0.7|^0.8|^0.9"
2727
},
2828
"require-dev": {
29-
"ekino/phpstan-banned-code": "^1.0",
29+
"ekino/phpstan-banned-code": "^1.0|^3.0",
3030
"larastan/larastan": "^1.0|^2.0",
3131
"mockery/mockery": "^1.4",
32-
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
32+
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0",
3333
"phpmd/phpmd": "^2.11",
34-
"phpstan/phpstan-deprecation-rules": "^1.0",
35-
"phpstan/phpstan-strict-rules": "^1.0",
34+
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
35+
"phpstan/phpstan-strict-rules": "^1.0|^2.0",
3636
"phpunit/phpunit": "^9.5|^10.0|^11.0"
3737
},
3838
"config": {

0 commit comments

Comments
 (0)