Skip to content

Commit 2617c5f

Browse files
committed
Add Zizmor, update GitHub actions & test against PHP 8.6/Sf 8.1
1 parent 4224d78 commit 2617c5f

6 files changed

Lines changed: 94 additions & 18 deletions

File tree

.github/dependabot.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ updates:
44
directory: '/'
55
schedule:
66
interval: 'weekly'
7+
groups:
8+
github-actions:
9+
patterns:
10+
- '*'
11+
cooldown:
12+
default-days: 7

.github/workflows/coding-standards.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
push:
77
branches: ['1.x']
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
916
jobs:
1017
easy-coding-standard:
1118
name: Easy Coding Standard (PHP ${{ matrix.php-version }})
@@ -18,17 +25,18 @@ jobs:
1825

1926
steps:
2027
- name: Checkout code
21-
uses: actions/checkout@v6
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
with:
30+
persist-credentials: false
2231

2332
- name: Install PHP
24-
uses: shivammathur/setup-php@v2
33+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
2534
with:
2635
coverage: none
2736
php-version: ${{ matrix.php-version }}
28-
tools: cs2pr
2937

3038
- name: Install Composer dependencies
31-
uses: ramsey/composer-install@v4
39+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
3240

3341
- name: Run Easy Coding Standard
34-
run: 'vendor/bin/ecs --output-format=checkstyle | cs2pr'
42+
run: vendor/bin/ecs

.github/workflows/continuous-integration.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
push:
77
branches: ['1.x']
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
916
jobs:
1017
phpunit:
1118
name: PHPUnit (PHP ${{ matrix.php-version }} - Symfony ${{ matrix.symfony-version }})
@@ -20,26 +27,30 @@ jobs:
2027
- '8.3'
2128
- '8.4'
2229
- '8.5'
30+
- '8.6'
2331
symfony-version:
2432
- '6.4.*'
2533
- '7.4.*'
2634
include:
2735
- php-version: '8.4'
28-
symfony-version: '8.0.*'
36+
symfony-version: '8.1.*'
2937
- php-version: '8.5'
30-
symfony-version: '8.0.*'
38+
symfony-version: '8.1.*'
39+
- php-version: '8.6'
40+
symfony-version: '8.1.*'
3141
- php-version: '8.5'
32-
symfony-version: '8.1.*@dev'
42+
symfony-version: '8.2.*@dev'
3343
continue-on-error: true
3444

3545
steps:
3646
- name: Checkout code
37-
uses: actions/checkout@v6
47+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3848
with:
3949
fetch-depth: 2
50+
persist-credentials: false
4051

4152
- name: Install PHP with pcov
42-
uses: shivammathur/setup-php@v2
53+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
4354
with:
4455
coverage: pcov
4556
php-version: ${{ matrix.php-version }}
@@ -50,11 +61,11 @@ jobs:
5061
run: composer config minimum-stability dev
5162

5263
- name: Install Composer dependencies
53-
uses: ramsey/composer-install@v4
64+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
5465

5566
- name: Run PHPUnit
5667
run: vendor/bin/phpunit --coverage-clover=coverage.xml
5768

5869
- name: Upload to Codecov
59-
uses: codecov/codecov-action@v4
70+
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
6071
if: matrix.php-version == '8.2' && matrix.symfony-version == '6.4.*'

.github/workflows/static-analysis.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ on:
66
push:
77
branches: ['1.x']
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
916
jobs:
1017
phpstan:
1118
name: PHPStan (PHP ${{ matrix.php-version }})
@@ -18,17 +25,18 @@ jobs:
1825

1926
steps:
2027
- name: Checkout code
21-
uses: actions/checkout@v6
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
29+
with:
30+
persist-credentials: false
2231

2332
- name: Install PHP
24-
uses: shivammathur/setup-php@v2
33+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
2534
with:
2635
coverage: none
2736
php-version: ${{ matrix.php-version }}
28-
tools: cs2pr
2937

3038
- name: Install Composer dependencies
31-
uses: ramsey/composer-install@v4
39+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
3240

3341
- name: Run PHPStan
34-
run: 'vendor/bin/phpstan analyse --error-format=checkstyle | cs2pr'
42+
run: vendor/bin/phpstan analyse

.github/workflows/zizmor.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
pull_request:
5+
branches: ["*.x"]
6+
paths:
7+
- '.github/**.yaml'
8+
push:
9+
branches: ["*.x"]
10+
paths:
11+
- '.github/**.yaml'
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
zizmor:
22+
name: Run zizmor 🌈
23+
runs-on: ubuntu-24.04
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
27+
with:
28+
persist-credentials: false
29+
30+
- name: Run zizmor 🌈
31+
uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa # v0.5.7
32+
with:
33+
advanced-security: false
34+
annotations: true
35+
persona: 'pedantic'

phpstan-baseline.neon

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
parameters:
2-
ignoreErrors: []
2+
ignoreErrors:
3+
-
4+
rawMessage: '''
5+
Return type of method Leapt\SlugTypeBundle\Tests\LeaptSlugTypeTestingKernel::registerBundles() has typehint with deprecated interface Symfony\Component\HttpKernel\Bundle\BundleInterface:
6+
since Symfony 8.1, use Symfony\Component\DependencyInjection\Kernel\BundleInterface instead
7+
'''
8+
identifier: return.deprecatedInterface
9+
count: 1
10+
path: tests/LeaptSlugTypeTestingKernel.php

0 commit comments

Comments
 (0)