Skip to content

Commit 241cc15

Browse files
committed
Merge branch '3.x' into 4.x
2 parents decf91a + 6b3e056 commit 241cc15

8 files changed

Lines changed: 152 additions & 83 deletions

File tree

.github/dependabot.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ updates:
88
directory: "/"
99
schedule:
1010
interval: "weekly"
11+
open-pull-requests-limit: 10
12+
cooldown:
13+
default-days: 7
1114
labels:
12-
- "dependencies"
15+
- "dependencies"
16+
- "github_actions"

.github/workflows/dependabot-auto-merge.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: fix-code-style
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
fix-code-style:
13+
runs-on: ubuntu-latest
14+
steps:
15+
# persist-credentials: true is required so `git-auto-commit-action` below
16+
# can push the reformatted files back to the branch.
17+
- name: Checkout code
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked]
19+
20+
- name: Cache Composer dependencies
21+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
22+
with:
23+
path: ~/.composer/cache/files
24+
key: composer-cs-${{ hashFiles('composer.json') }}
25+
restore-keys: |
26+
composer-cs-
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
30+
with:
31+
php-version: 8.4
32+
33+
- name: Install dependencies
34+
run: composer install --no-interaction --no-scripts
35+
36+
- name: Run Pint
37+
run: ./vendor/bin/pint
38+
39+
- name: Commit changes
40+
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
41+
with:
42+
commit_message: Fix styling

.github/workflows/fix-php-code-style-issues.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/phpstan.yml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,64 @@
1-
name: PHPStan
1+
name: phpstan
22

33
on:
44
push:
5-
paths:
6-
- '**.php'
7-
- 'phpstan.neon.dist'
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
813

914
jobs:
1015
phpstan:
11-
name: phpstan
1216
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
php: [8.4, 8.3, 8.2]
21+
laravel: [12.*, 11.*]
22+
stability: [prefer-stable]
23+
include:
24+
- laravel: 12.*
25+
testbench: 10.*
26+
- laravel: 11.*
27+
testbench: 9.*
28+
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
1329
steps:
14-
- uses: actions/checkout@v6
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
31+
with:
32+
persist-credentials: false
33+
34+
- name: Cache Composer dependencies
35+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
36+
with:
37+
path: ~/.composer/cache/files
38+
key: composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('composer.json') }}
39+
restore-keys: |
40+
composer-${{ matrix.php }}-${{ matrix.laravel }}-
41+
composer-${{ matrix.php }}-
42+
43+
- name: Cache PHPStan result
44+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
45+
with:
46+
path: /tmp/phpstan
47+
key: phpstan-${{ matrix.php }}-${{ matrix.laravel }}-${{ github.sha }}
48+
restore-keys: |
49+
phpstan-${{ matrix.php }}-${{ matrix.laravel }}-
1550
1651
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
52+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
1853
with:
19-
php-version: '8.2'
54+
php-version: ${{ matrix.php }}
55+
extensions: mbstring, pdo, pdo_sqlite
2056
coverage: none
2157

22-
- name: Install composer dependencies
23-
uses: ramsey/composer-install@v3
58+
- name: Install dependencies
59+
run: |
60+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
61+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
2462
2563
- name: Run PHPStan
2664
run: ./vendor/bin/phpstan --error-format=github
Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
name: "Run Tests"
1+
name: tests
22

33
on:
44
push:
5-
branches: [main]
65
pull_request:
7-
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
813

914
jobs:
10-
test:
15+
run-tests:
1116
runs-on: ${{ matrix.os }}
1217
strategy:
1318
fail-fast: true
@@ -29,11 +34,21 @@ jobs:
2934
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
3035

3136
steps:
32-
- name: Checkout code
33-
uses: actions/checkout@v6
37+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38+
with:
39+
persist-credentials: false
40+
41+
- name: Cache Composer dependencies
42+
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
43+
with:
44+
path: ~/.composer/cache/files
45+
key: composer-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ matrix.stability }}-${{ hashFiles('composer.json') }}
46+
restore-keys: |
47+
composer-${{ matrix.os }}-${{ matrix.php }}-${{ matrix.laravel }}-
48+
composer-${{ matrix.os }}-${{ matrix.php }}-
3449
3550
- name: Setup PHP
36-
uses: shivammathur/setup-php@v2
51+
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
3752
with:
3853
php-version: ${{ matrix.php }}
3954
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
@@ -49,7 +64,7 @@ jobs:
4964
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
5065
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
5166
52-
- name: List Installed Dependencies
67+
- name: List installed dependencies
5368
run: composer show -D
5469

5570
- name: Execute tests

.github/workflows/update-changelog.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Update Changelog"
1+
name: update-changelog
22

33
on:
44
release:
@@ -12,19 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15+
# persist-credentials: true is required so `git-auto-commit-action` below
16+
# can push the CHANGELOG update.
1517
- name: Checkout code
16-
uses: actions/checkout@v6
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked]
1719
with:
1820
ref: main
1921

2022
- name: Update Changelog
21-
uses: stefanzweifel/changelog-updater-action@v1
23+
uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0
2224
with:
2325
latest-version: ${{ github.event.release.name }}
2426
release-notes: ${{ github.event.release.body }}
2527

2628
- name: Commit updated CHANGELOG
27-
uses: stefanzweifel/git-auto-commit-action@v7
29+
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
2830
with:
2931
branch: main
3032
commit_message: Update CHANGELOG

.github/workflows/zizmor.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: zizmor
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/workflows/**'
7+
- '.github/dependabot.yml'
8+
pull_request:
9+
paths:
10+
- '.github/workflows/**'
11+
- '.github/dependabot.yml'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
zizmor:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
steps:
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
23+
with:
24+
persist-credentials: false
25+
26+
- uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
27+
with:
28+
advanced-security: false

0 commit comments

Comments
 (0)