Skip to content

Commit b9cadeb

Browse files
Merge pull request #46 from laravel-shift/l12-compatibility
Laravel 12.x Compatibility
2 parents 4e7425f + 273e3f2 commit b9cadeb

File tree

2 files changed

+95
-14
lines changed

2 files changed

+95
-14
lines changed

.github/workflows/main.yml

Lines changed: 89 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,47 @@ name: CI
22

33
on:
44
pull_request:
5-
paths-ignore: ["*.md"]
5+
paths-ignore:
6+
- *.md
67
push:
7-
paths-ignore: ["*.md"]
8+
paths-ignore:
9+
- *.md
810

911
jobs:
1012
analysis:
13+
14+
1115
runs-on: ubuntu-latest
16+
17+
18+
1219
strategy:
1320
matrix:
14-
php: [8.3]
21+
php: ['8.2', 8.3, '8.3', '8.4']
22+
23+
24+
1525
steps:
1626
- uses: actions/checkout@v4
27+
28+
29+
1730
- name: Setup PHP
1831
uses: shivammathur/setup-php@v2
1932
with:
2033
php-version: ${{ matrix.php }}
2134
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
2235
coverage: none
36+
37+
38+
2339
- name: Get Composer Cache Directory
2440
id: composer-cache
2541
run: |
2642
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
43+
44+
45+
2746
- name: Cache composer dependencies
2847
uses: actions/cache@v4
2948
env:
@@ -33,30 +52,57 @@ jobs:
3352
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
3453
restore-keys: |
3554
php-${{ matrix.php }}-build-${{ env.cache-name }}-
55+
56+
57+
3658
- name: Install composer dependencies
3759
run: composer install --prefer-dist
60+
61+
62+
3863
- name: Run static analysis
3964
run: composer analyse
65+
4066
test:
4167
name: Test (PHP ${{ matrix.php }})
42-
needs: [analysis]
68+
69+
70+
needs:
71+
- analysis
72+
73+
4374
runs-on: ubuntu-latest
75+
76+
77+
4478
strategy:
4579
matrix:
4680
php: [8.0, 8.1, 8.2]
81+
82+
83+
4784
steps:
4885
- name: Checkout repository
4986
uses: actions/checkout@v4
87+
88+
89+
5090
- name: Set up PHP
5191
uses: shivammathur/setup-php@v2
5292
with:
5393
php-version: ${{ matrix.php }}
5494
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
5595
coverage: none
96+
97+
98+
5699
- name: Get Composer Cache Directory
57100
id: composer-cache
58101
run: |
59102
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
103+
104+
105+
60106
- name: Cache composer dependencies
61107
uses: actions/cache@v4
62108
env:
@@ -66,41 +112,76 @@ jobs:
66112
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
67113
restore-keys: |
68114
php-${{ matrix.php }}-build-${{ env.cache-name }}-
115+
116+
117+
69118
- name: Install composer dependencies
70119
run: composer install --no-interaction --prefer-dist
120+
121+
122+
71123
- name: Run PHPUnit tests
72124
run: vendor/bin/phpunit
125+
73126
test-coverage:
74127
name: Test (PHP ${{ matrix.php }})
75-
needs: [analysis]
128+
129+
130+
needs:
131+
- analysis
132+
133+
76134
runs-on: ubuntu-latest
135+
136+
137+
77138
strategy:
78139
matrix:
79-
php: [8.3]
140+
php: ['8.2', 8.3, '8.3', '8.4']
141+
142+
143+
80144
steps:
81145
- name: Checkout repository
82146
uses: actions/checkout@v4
147+
148+
149+
83150
- name: Set up PHP
84151
uses: shivammathur/setup-php@v2
85152
with:
86153
php-version: ${{ matrix.php }}
87154
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
155+
156+
157+
88158
- name: Get Composer Cache Directory
89159
id: composer-cache
90160
run: |
91161
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
162+
163+
164+
92165
- name: Cache composer dependencies
93166
uses: actions/cache@v4
94167
env:
95168
cache-name: eloquent-blameable-test
96169
with:
97170
path: ${{ steps.composer-cache.outputs.dir }}
98171
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
99-
restore-keys: |
100-
php-${{ matrix.php }}-build-${{ env.cache-name }}-
172+
restore-keys: php-${{ matrix.php }}-build-${{ env.cache-name }}-
173+
174+
175+
101176
- name: Install composer dependencies
102177
run: composer install --no-interaction --prefer-dist
178+
179+
180+
103181
- name: Run PHPUnit tests and generate code coverage
104182
run: vendor/bin/phpunit --coverage-clover=clover.xml
183+
184+
185+
105186
- name: Upload code coverage results
106187
run: bash <(curl -s https://codecov.io/bash)

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@
2222
},
2323
"require": {
2424
"php": "^8.0",
25-
"illuminate/database": "^8.0|^9.0|^10.0|^11.0",
26-
"illuminate/support": "^8.0|^9.0|^10.0|^11.0"
25+
"illuminate/database": "^8.0|^9.0|^10.0|^11.0|^12.0",
26+
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0"
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)