miserenkov / phpstan-yii2-laravel
Yii2 extension for PHPStan with Laravel proxy
v1.0
2023-04-11 20:06 UTC
Requires
- php: ^7.4|^8.0
- nikic/php-parser: ^4.1.0
- nunomaduro/larastan: ^1.0|^2.0
- phpstan/phpstan: ^1.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.1
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: ^8.0
- yiisoft/yii2: ^2.0.42
This package is auto-updated.
Last update: 2024-10-11 23:18:21 UTC
README
What does it do?
- 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).
Compatibility
Installation
composer require --dev miserenkov/phpstan-yii2-laravel
Configuration
Put this into your phpstan.neon
config:
includes: - vendor/miserenkov/phpstan-yii2-laravel/extension.neon parameters: yii2: application_id: api
Limitations
Container closures must have return types.
You have to provide config for yii application in laravel application in key yii.{application_id}