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"
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
Check the documentation testing to learn about testing.
BSD-3-Clause license. Please see License File for more information.
This package is a fork of proget-hq/phpstan-yii2 with some corrections.