- Provides correct return type for Yii::$container->get('service_id')method,
- Provides correct methods and properties for Yii::$app->request
- Ignore common problems with response objects (to be removed).
| PHPStan version | Yii2 extension version | 
|---|---|
| 1.x | 0.8.x | 
| 0.12 | 0.7.x | 
| 0.11 | 0.5.x - 0.6.x | 
| 0.10.3 | 0.4.x | 
| 0.10 | 0.3.0 | 
| 0.9.2 | 0.2.0 | 
composer require --dev proget-hq/phpstan-yii2Put this into your phpstan.neon config:
includes:
	- vendor/proget-hq/phpstan-yii2/extension.neon
parameters:
    yii2:
        config_path: %rootDir%/../../../config/test.phpContainer closures must have return types.
You have to provide a path to config/test.php or other yii2 config file.