From 7d5b1924b6d2889f5c864b9b68728cc54ca1a82c Mon Sep 17 00:00:00 2001 From: Arkadiusz Kondas Date: Tue, 6 Mar 2018 23:31:40 +0100 Subject: [PATCH] Add README --- README.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..26ad41c --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Yii2 extension for PHPStan + +## What does it do? + +* Provides correct return type for `Yii::$container->get('service_id')` method, +* Ignore common problems with active record and request/response objects. + +## Installation + +```sh +composer require --dev proget-hq/phpstan-yii2 +``` + +## Configuration + +Put this into your `phpstan.neon` config: + +```neon +includes: + - vendor/proget-hq/phpstan-yii2/extension.neon +parameters: + yii2: + config_path: %rootDir%/../../../config/test.php +``` + +## Limitations + +Container closures must have return types. + +You have to provide a path to `config/test.php` or other yii2 config file.