Skip to content

Commit 985f6b1

Browse files
authored
Update GitHub Actions workflow for Psalm with PHP 8.4 and improved ca… (#50)
* Update GitHub Actions workflow for Psalm with PHP 8.4 and improved caching * Fix GitHub Actions workflow paths for Psalm to include wildcard syntax * Add MissingOverrideAttribute handler to Psalm configuration
1 parent c246af4 commit 985f6b1

2 files changed

Lines changed: 22 additions & 9 deletions

File tree

.github/workflows/psalm.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,39 @@ name: Psalm
22

33
on:
44
push:
5+
branches:
6+
- master
57
paths:
6-
- '**.php'
8+
- '**/*.php'
79
- 'psalm.xml.dist'
10+
- 'composer.json'
11+
- 'composer.lock'
12+
- '.github/workflows/psalm.yml'
13+
pull_request:
14+
branches:
15+
- master
16+
paths:
17+
- '**/*.php'
18+
- 'psalm.xml.dist'
19+
- 'composer.json'
20+
- 'composer.lock'
21+
- '.github/workflows/psalm.yml'
822

923
jobs:
1024
psalm:
1125
name: psalm
1226
runs-on: ubuntu-latest
1327
steps:
14-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
1529

1630
- name: Setup PHP
1731
uses: shivammathur/setup-php@v2
1832
with:
19-
php-version: '7.4'
33+
php-version: '8.4'
2034
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
2135
coverage: none
22-
23-
- name: Cache composer dependencies
24-
uses: actions/cache@v2
25-
with:
26-
path: vendor
27-
key: composer-${{ hashFiles('composer.lock') }}
36+
tools: composer:v2
37+
cache: composer
2838

2939
- name: Run composer install
3040
run: composer install -n --prefer-dist

psalm.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,7 @@
1515
<directory name="vendor"/>
1616
</ignoreFiles>
1717
</projectFiles>
18+
<issueHandlers>
19+
<MissingOverrideAttribute errorLevel="info"/>
20+
</issueHandlers>
1821
</psalm>

0 commit comments

Comments
 (0)