Skip to content

Commit

Permalink
Merge pull request #15 from yamadashy/feature/phpstan-v2
Browse files Browse the repository at this point in the history
Update to PHPStan 2.0
  • Loading branch information
yamadashy authored Nov 13, 2024
2 parents aa1358d + d042412 commit 3385bd3
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
steps:
- uses: actions/checkout@v4
- name: Setup PHP
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run coding standards check
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
php-version: '8.3'
- name: Install dependencies
run: composer update --no-interaction --no-progress --ansi
- name: Run static analysis
Expand All @@ -67,7 +67,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
php-version: ['7.4', '8.0', '8.1', '8.2', '8.3']
dependency-version: [prefer-lowest, prefer-stable]
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
php 8.3.11
php 8.3.13
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
}
],
"require": {
"php": "^7.2 || ^8.0",
"php": "^7.4 || ^8.0",
"php-parallel-lint/php-console-highlighter": "^0.3 || ^0.4 || ^0.5 || ^1.0",
"phpstan/phpstan": "^0.12 || ^1.0"
"phpstan/phpstan": "^0.12 || ^1.0 || ^2.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.4.0",
"grifart/phpstan-oneline": "^0.4.2",
"phpstan/phpstan-phpunit": "^0.12.22 || ^1.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^8.5.26 || ^10.0.0"
},
"minimum-stability": "dev",
Expand Down Expand Up @@ -52,7 +51,6 @@
"analyze": "phpstan analyze -c phpstan.neon.dist --error-format friendly",
"analyze-raw": "phpstan analyze -c phpstan.neon.dist --error-format raw",
"analyze-table": "phpstan analyze -c phpstan.neon.dist --error-format table",
"analyze-oneline": "phpstan analyze -c phpstan.neon.dist --error-format oneline",
"cs-fix": "php-cs-fixer fix",
"cs-fix-dry": "php-cs-fixer fix --dry-run"
}
Expand Down
4 changes: 1 addition & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
includes:
- extension.neon
- vendor/grifart/phpstan-oneline/config.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
level: 9
level: 10
paths:
- src
- tests

excludePaths:
- tests/data/
- tests/Abstracts/

checkUninitializedProperties: true
checkMissingCallableSignature: true
Expand Down
2 changes: 1 addition & 1 deletion tests/CodeHighlight/CodeHighlighterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @internal
*
* @coversDefaultClass \Yamadashy\PhpStanFriendlyFormatter\CodeHighlighter
* @coversDefaultClass \Yamadashy\PhpStanFriendlyFormatter\CodeHighlight\CodeHighlighter
*/
final class CodeHighlighterTest extends TestCase
{
Expand Down

0 comments on commit 3385bd3

Please sign in to comment.