Skip to content

Commit 2b589c5

Browse files
committed
Add compatibility with phpstan 1.x
1 parent 1dc56b6 commit 2b589c5

16 files changed

+475
-428
lines changed

.github/workflows/php.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,21 @@ on: [push,pull_request]
44

55
jobs:
66
build:
7-
7+
name: "Tests (PHP: ${{ matrix.php-version}})"
88
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-version: ['7.4', '8.0']
913

1014
steps:
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: "${{ matrix.php-version }}"
19+
ini-values: "memory_limit=-1"
20+
coverage: none
21+
1122
- uses: actions/checkout@v1
1223

1324
- name: Get Composer Cache Directory

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1212
* **Fixed** for any bug fixes.
1313
* **Security** in case of vulnerabilities.
1414

15+
## [0.8.0] 2022-08-01
16+
### Added
17+
* Initial phpstan 1.x support
18+
1519
## [0.7.6] 2021-08-10
1620
### Added
1721
* Compatibility with yii 2.0.43 (#45)

composer.json

+12-7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"require": {
1717
"php": "^7.2|^8.0",
1818
"nikic/php-parser": "^4.1.0",
19-
"phpstan/phpstan": "^0.12.91"
19+
"phpstan/phpstan": "^1.3.3"
2020
},
2121
"require-dev": {
2222
"friendsofphp/php-cs-fixer": "^3.1",
2323
"phpunit/phpunit": "^8.0",
2424
"yiisoft/yii2": "^2.0.42",
25-
"phpstan/phpstan-phpunit": "^0.12"
25+
"phpstan/phpstan-phpunit": "^1.0"
2626
},
2727
"autoload": {
2828
"psr-4": {
@@ -40,15 +40,20 @@
4040
"@stan",
4141
"@tests"
4242
],
43-
"check-cs": "php-cs-fixer fix --dry-run --diff",
44-
"fix-cs": "php-cs-fixer fix",
45-
"stan": "phpstan analyse -l max -c ./phpstan.neon ./src ./tests",
46-
"tests": "phpunit"
43+
"check-cs": "@php php-cs-fixer fix --dry-run --diff",
44+
"fix-cs": "@php php-cs-fixer fix",
45+
"stan": "@php phpstan analyse -l max -c ./phpstan.neon ./src ./tests",
46+
"tests": "@php phpunit"
4747
},
4848
"repositories": [
4949
{
5050
"type": "composer",
5151
"url": "https://asset-packagist.org"
5252
}
53-
]
53+
],
54+
"config": {
55+
"allow-plugins": {
56+
"yiisoft/yii2-composer": true
57+
}
58+
}
5459
}

0 commit comments

Comments
 (0)