Skip to content

Commit

Permalink
[FEATURE] Add experimental support for PHPStan 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Oct 9, 2024
1 parent 5b556a1 commit c2084c3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ on:

jobs:
tests:
name: Tests (PHP ${{ matrix.php-version }} & ${{ matrix.dependencies }} dependencies)
name: Tests (PHP ${{ matrix.php-version }}, PHPStan v${{ matrix.phpstan-version }} & ${{ matrix.dependencies }} dependencies)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ["8.1", "8.2", "8.3"]
dependencies: ["locked", "highest", "lowest"]
phpstan-version: ["1", "2"]
dependencies: ["highest", "lowest"]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -34,6 +35,7 @@ jobs:
- name: Install Composer dependencies
uses: ramsey/composer-install@v2
with:
composer-options: --with=phpstan/phpstan:^${{ matrix.phpstan-version }}
dependency-versions: ${{ matrix.dependencies }}

# Run tests
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
],
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-strict-rules": "^1.4"
"phpstan/phpstan": "^1.9 || ^2.0@dev",
"phpstan/phpstan-deprecation-rules": "^1.1 || ^2.0@dev",
"phpstan/phpstan-strict-rules": "^1.4 || ^2.0@dev"
},
"require-dev": {
"armin/editorconfig-cli": "^1.8 || ^2.0",
Expand All @@ -24,6 +24,7 @@
"ergebnis/composer-normalize": "^2.29",
"phpunit/phpunit": "^10.1 || ^11.0"
},
"prefer-stable": true,
"autoload": {
"psr-4": {
"EliasHaeussler\\PHPStanConfig\\": "src/"
Expand Down
12 changes: 8 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c2084c3

Please sign in to comment.