Skip to content

Commit e199ea2

Browse files
Run PHPStan using the lowest and highest php version (#811)
This pull request makes changes to the GitHub Actions workflow configuration for running PHPStan, a PHP static analysis tool. The most important changes include renaming the job, adding a matrix strategy for different PHP versions, and updating the PHP installation step. Improvements to the GitHub Actions workflow: * [`.github/workflows/phpstan.yml`](diffhunk://#diff-73a1d6ddd0eabb7e1349cdb83b76ff10f29f9e4fe316c0cd29495174181f4546L15-R36): Renamed the job from `tests` to `phpstan` to better reflect its purpose. * [`.github/workflows/phpstan.yml`](diffhunk://#diff-73a1d6ddd0eabb7e1349cdb83b76ff10f29f9e4fe316c0cd29495174181f4546L15-R36): Added a matrix strategy to run PHPStan on multiple PHP versions (7.2 and 8.4). * [`.github/workflows/phpstan.yml`](diffhunk://#diff-73a1d6ddd0eabb7e1349cdb83b76ff10f29f9e4fe316c0cd29495174181f4546L15-R36): Updated the PHP installation step to use the matrix's PHP version instead of a hardcoded version.
1 parent c9f00de commit e199ea2

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/phpstan.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,28 @@ env:
1212
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --prefer-dist"
1313

1414
jobs:
15-
tests:
15+
phpstan:
1616
name: "PHPStan"
1717

1818
runs-on: ubuntu-latest
1919

20+
strategy:
21+
matrix:
22+
php-version:
23+
- "7.2"
24+
- "latest"
25+
2026
steps:
2127
- name: "Checkout"
2228
uses: "actions/checkout@v4"
2329

2430
- name: "Install PHP"
2531
uses: "shivammathur/setup-php@v2"
2632
with:
27-
coverage: "none"
33+
php-version: "${{ matrix.php-version }}"
2834
extensions: "intl, zip"
2935
ini-values: "memory_limit=-1"
30-
php-version: "7.2"
36+
coverage: "none"
3137

3238
- name: "Update dependencies"
3339
run: "composer update ${{ env.COMPOSER_FLAGS }}"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88
## [Unreleased]
9+
### Added
10+
- Run PHPStan using the lowest and highest php version ([#811](https://github.com/jsonrainbow/json-schema/pull/811))
911

1012
## [6.3.1] - 2025-03-18
1113
### Fixed

0 commit comments

Comments
 (0)