Skip to content

Commit 3904cfb

Browse files
committed
Drop PHPUnit 9.6 support, add Psalm SARIF reporting, and update README
- Remove PHPUnit ^9.6 from composer.json (PHP 8.3+ requires PHPUnit 10.5+) - Separate Psalm analysis into dedicated workflow job with SARIF upload - Add GitHub Sponsor badge to README
1 parent 27dde1b commit 3904cfb

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/phpunit.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,37 @@ jobs:
4545
steps:
4646
- uses: actions/checkout@v5
4747
- run: composer install
48-
- run: composer psalm
4948
- run: composer test
5049

50+
Psalm:
51+
name: Psalm Static Analyzer
52+
runs-on: ubuntu-latest
53+
permissions:
54+
# for github/codeql-action/upload-sarif to upload SARIF results
55+
security-events: write
56+
container:
57+
image: byjg/php:8.4-cli
58+
options: --user root --privileged
59+
60+
steps:
61+
- name: Git checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Composer
65+
run: composer install
66+
67+
- name: Psalm
68+
# Note: Ignoring error code 2, which just signals that some
69+
# flaws were found, not that Psalm itself failed to run.
70+
run: ./vendor/bin/psalm
71+
--show-info=true
72+
--report=psalm-results.sarif || [ $? = 2 ]
73+
74+
- name: Upload Analysis results to GitHub
75+
uses: github/codeql-action/upload-sarif@v4
76+
with:
77+
sarif_file: psalm-results.sarif
78+
5179
Documentation:
5280
if: github.ref == 'refs/heads/master'
5381
needs: Build

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Cache Engine
22

3+
[![Sponsor](https://img.shields.io/badge/Sponsor-%23ea4aaa?logo=githubsponsors&logoColor=white&labelColor=0d1117)](https://github.com/sponsors/byjg)
34
[![Build Status](https://github.com/byjg/php-cache-engine/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-cache-engine/actions/workflows/phpunit.yml)
45
[![Opensource ByJG](https://img.shields.io/badge/opensource-byjg-success.svg)](http://opensource.byjg.com)
56
[![GitHub source](https://img.shields.io/badge/Github-source-informational?logo=github)](https://github.com/byjg/php-cache-engine/)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"psr/container": "^1.0|^1.1|^2.0"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^9.6|^10.5|^11.5",
22+
"phpunit/phpunit": "^10.5|^11.5",
2323
"vimeo/psalm": "^5.9|^6.13"
2424
},
2525
"suggest": {

0 commit comments

Comments
 (0)