yii2-extensions / phpstan
PHPStan extension for Yii2
Fund package maintenance!
terabytesoftw
Installs: 18 599
Dependents: 24
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Requires
- php: >=8.1
- nikic/php-parser: ^4.1|^5.4.0
- phpstan/phpstan: ^2.1
- yiisoft/yii2: ^2.0.52 || ^22
Requires (Dev)
- maglnet/composer-require-checker: ^4.7
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.2
- symplify/easy-coding-standard: ^12.1
This package is auto-updated.
Last update: 2025-06-03 16:38:07 UTC
README
Extension for PHPStan.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --dev --prefer-dist yii2-extensions/phpstan:^0.2
or add
"yii2-extensions/phpstan": "^0.2"
Usage
To use this extension, you need to add the following configuration to your phpstan.neon
file:
includes: - vendor/yii2-extensions/phpstan/extension.neon parameters: bootstrapFiles: - tests/bootstrap.php dynamicConstantNames: - YII_DEBUG - YII_ENV level: 5 paths: - src scanFiles: - vendor/yiisoft/yii2/Yii.php yii2: # Path to your Yii2 configuration file config_path: %currentWorkingDirectory%/config/test.php
Quality code
Testing
Check the documentation testing to learn about testing.
Our social networks
License
BSD-3-Clause license. Please see License File for more information.
Fork
This package is a fork of proget-hq/phpstan-yii2 with some corrections.