Skip to content

Commit 05adefc

Browse files
Laravel 12.x Compatibility (#37)
* Bump dependencies for Laravel 12 * Update GitHub Actions for Laravel 12
1 parent 77e4d0b commit 05adefc

File tree

2 files changed

+100
-15
lines changed

2 files changed

+100
-15
lines changed

.github/workflows/main.yml

Lines changed: 94 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,32 +54,62 @@ 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 --prefer-dist
62+
63+
64+
3965
- name: Run phpstan analysis
4066
run: composer phpstan-analysis
67+
68+
69+
4170
- name: Run phpmd analysis
4271
run: composer phpmd-analysis
72+
4373
test:
4474
name: Test (PHP ${{ matrix.php }})
45-
needs: [analysis]
75+
76+
77+
needs:
78+
- analysis
79+
80+
4681
runs-on: ubuntu-latest
82+
83+
84+
4785
strategy:
4886
matrix:
4987
php: [8.0, 8.1, 8.2]
88+
89+
90+
5091
steps:
5192
- name: Checkout repository
5293
uses: actions/checkout@v4
94+
95+
96+
5397
- name: Set up PHP
5498
uses: shivammathur/setup-php@v2
5599
with:
56100
php-version: ${{ matrix.php }}
57101
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
58102
coverage: none
103+
104+
105+
59106
- name: Get Composer Cache Directory
60107
id: composer-cache
61108
run: |
62109
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
110+
111+
112+
63113
- name: Cache composer dependencies
64114
uses: actions/cache@v4
65115
env:
@@ -69,41 +119,76 @@ jobs:
69119
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
70120
restore-keys: |
71121
php-${{ matrix.php }}-build-${{ env.cache-name }}-
122+
123+
124+
72125
- name: Install composer dependencies
73126
run: composer install --no-interaction --prefer-dist
127+
128+
129+
74130
- name: Run PHPUnit tests
75131
run: vendor/bin/phpunit
132+
76133
test-coverage:
77134
name: Test (PHP ${{ matrix.php }})
78-
needs: [analysis]
135+
136+
137+
needs:
138+
- analysis
139+
140+
79141
runs-on: ubuntu-latest
142+
143+
144+
80145
strategy:
81146
matrix:
82-
php: [8.3]
147+
php: ['8.2', 8.3, '8.3', '8.4']
148+
149+
150+
83151
steps:
84152
- name: Checkout repository
85153
uses: actions/checkout@v4
154+
155+
156+
86157
- name: Set up PHP
87158
uses: shivammathur/setup-php@v2
88159
with:
89160
php-version: ${{ matrix.php }}
90161
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
162+
163+
164+
91165
- name: Get Composer Cache Directory
92166
id: composer-cache
93167
run: |
94168
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
169+
170+
171+
95172
- name: Cache composer dependencies
96173
uses: actions/cache@v4
97174
env:
98175
cache-name: laravel-i18n-test
99176
with:
100177
path: ${{ steps.composer-cache.outputs.dir }}
101178
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
102-
restore-keys: |
103-
php-${{ matrix.php }}-build-${{ env.cache-name }}-
179+
restore-keys: php-${{ matrix.php }}-build-${{ env.cache-name }}-
180+
181+
182+
104183
- name: Install composer dependencies
105184
run: composer install --no-interaction --prefer-dist
185+
186+
187+
106188
- name: Run PHPUnit tests and generate code coverage
107189
run: vendor/bin/phpunit --coverage-clover=clover.xml
190+
191+
192+
108193
- name: Upload code coverage results
109194
run: bash <(curl -s https://codecov.io/bash)

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
},
2929
"require": {
3030
"php": "^8.0",
31-
"illuminate/database": "^8.0|^9.0|^10.0|^11.0",
32-
"illuminate/support": "^8.0|^9.0|^10.0|^11.0",
31+
"illuminate/database": "^8.0|^9.0|^10.0|^11.0|^12.0",
32+
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
3333
"nesbot/carbon": "^2.16|^3.0"
3434
},
3535
"require-dev": {
36-
"ekino/phpstan-banned-code": "^1.0",
36+
"ekino/phpstan-banned-code": "^1.0|^3.0",
3737
"fakerphp/faker": "^1.9",
3838
"mockery/mockery": "^1.4",
3939
"larastan/larastan": "^1.0|^2.0",
40-
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0",
40+
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0",
4141
"phpmd/phpmd": "^2.11",
42-
"phpstan/phpstan-deprecation-rules": "^1.0",
43-
"phpstan/phpstan-strict-rules": "^1.0",
42+
"phpstan/phpstan-deprecation-rules": "^1.0|^2.0",
43+
"phpstan/phpstan-strict-rules": "^1.0|^2.0",
4444
"phpunit/phpunit": "^9.5|^10.0|^11.0"
4545
},
4646
"config": {

0 commit comments

Comments
 (0)