Skip to content

Commit 5e2d43f

Browse files
Add support for Laravel 12
1 parent 3622e4d commit 5e2d43f

File tree

3 files changed

+17
-98
lines changed

3 files changed

+17
-98
lines changed

.github/workflows/main.yml

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

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

1310
jobs:
1411
analysis:
15-
16-
1712
runs-on: ubuntu-latest
18-
19-
20-
2113
strategy:
2214
matrix:
23-
php: ['8.2', 8.3, '8.3', '8.4']
24-
25-
26-
15+
php: [8.3]
2716
steps:
2817
- uses: actions/checkout@v4
29-
30-
31-
3218
- name: Setup PHP
3319
uses: shivammathur/setup-php@v2
3420
with:
3521
php-version: ${{ matrix.php }}
3622
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
3723
coverage: none
38-
39-
40-
4124
- name: Get Composer Cache Directory
4225
id: composer-cache
4326
run: |
4427
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
45-
46-
47-
4828
- name: Cache composer dependencies
4929
uses: actions/cache@v4
5030
env:
@@ -54,57 +34,30 @@ jobs:
5434
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
5535
restore-keys: |
5636
php-${{ matrix.php }}-build-${{ env.cache-name }}-
57-
58-
59-
6037
- name: Install composer dependencies
6138
run: composer install --no-interaction --prefer-dist
62-
63-
64-
6539
- name: Run static analysis
6640
run: composer analyse
67-
6841
test:
6942
name: Test (PHP ${{ matrix.php }})
70-
71-
72-
needs:
73-
- analysis
74-
75-
43+
needs: [analysis]
7644
runs-on: ubuntu-latest
77-
78-
79-
8045
strategy:
8146
matrix:
82-
php: [8.0, 8.1, 8.2]
83-
84-
85-
47+
php: [8.0, 8.1, 8.2, 8.3, 8.4]
8648
steps:
8749
- name: Checkout repository
8850
uses: actions/checkout@v4
89-
90-
91-
9251
- name: Set up PHP
9352
uses: shivammathur/setup-php@v2
9453
with:
9554
php-version: ${{ matrix.php }}
9655
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
9756
coverage: none
98-
99-
100-
10157
- name: Get Composer Cache Directory
10258
id: composer-cache
10359
run: |
10460
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
105-
106-
107-
10861
- name: Cache composer dependencies
10962
uses: actions/cache@v4
11063
env:
@@ -114,76 +67,41 @@ jobs:
11467
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
11568
restore-keys: |
11669
php-${{ matrix.php }}-build-${{ env.cache-name }}-
117-
118-
119-
12070
- name: Install composer dependencies
12171
run: composer install --no-interaction --prefer-dist
122-
123-
124-
12572
- name: Run PHPUnit tests
12673
run: vendor/bin/phpunit
127-
12874
test-coverage:
12975
name: Test (PHP ${{ matrix.php }})
130-
131-
132-
needs:
133-
- analysis
134-
135-
76+
needs: [analysis]
13677
runs-on: ubuntu-latest
137-
138-
139-
14078
strategy:
14179
matrix:
142-
php: ['8.2', 8.3, '8.3', '8.4']
143-
144-
145-
80+
php: [8.3]
14681
steps:
14782
- name: Checkout repository
14883
uses: actions/checkout@v4
149-
150-
151-
15284
- name: Set up PHP
15385
uses: shivammathur/setup-php@v2
15486
with:
15587
php-version: ${{ matrix.php }}
15688
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, gd, exif, iconv
157-
158-
159-
16089
- name: Get Composer Cache Directory
16190
id: composer-cache
16291
run: |
16392
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
164-
165-
166-
16793
- name: Cache composer dependencies
16894
uses: actions/cache@v4
16995
env:
17096
cache-name: laravel-gcr-worker-test
17197
with:
17298
path: ${{ steps.composer-cache.outputs.dir }}
17399
key: php-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.json') }}
174-
restore-keys: php-${{ matrix.php }}-build-${{ env.cache-name }}-
175-
176-
177-
100+
restore-keys: |
101+
php-${{ matrix.php }}-build-${{ env.cache-name }}-
178102
- name: Install composer dependencies
179103
run: composer install --no-interaction --prefer-dist
180-
181-
182-
183104
- name: Run PHPUnit tests and generate code coverage
184105
run: vendor/bin/phpunit --coverage-clover=clover.xml
185-
186-
187-
188106
- name: Upload code coverage results
189107
run: bash <(curl -s https://codecov.io/bash)

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "richan-fongdasen/laravel-gcr-worker",
3-
"description": "Easily generates RESTful API endpoints in Laravel",
3+
"description": "Google Cloud Run Worker for Laravel",
44
"type": "library",
55
"license": "MIT",
66
"homepage": "https://github.com/richan-fongdasen/laravel-gcr-worker",
@@ -23,11 +23,11 @@
2323
"illuminate/console": "^8.0|^9.0|^10.0|^11.0|^12.0",
2424
"illuminate/queue": "^8.0|^9.0|^10.0|^11.0|^12.0",
2525
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
26-
"kainxspirits/laravel-pubsub-queue": "^0.6|^0.7|^0.8|^0.9"
26+
"kainxspirits/laravel-pubsub-queue": "^0.6|^0.7|^0.8|^0.9|^0.10"
2727
},
2828
"require-dev": {
29-
"ekino/phpstan-banned-code": "^1.0|^3.0",
30-
"larastan/larastan": "^1.0|^2.0",
29+
"ekino/phpstan-banned-code": "^1.0",
30+
"larastan/larastan": "^1.0|^2.0|^3.0",
3131
"mockery/mockery": "^1.4",
3232
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0",
3333
"phpmd/phpmd": "^2.11",

phpstan.neon

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ includes:
66

77
parameters:
88
level: 8
9-
checkMissingIterableValueType: false
10-
checkGenericClassInNonGenericObjectType: false
119
paths:
1210
- src
11+
ignoreErrors:
12+
- identifier: missingType.iterableValue
13+
- identifier: missingType.generics
1314
banned_code:
1415
nodes:
1516
- type: Expr_FuncCall

0 commit comments

Comments
 (0)