Skip to content

Commit 7d5b192

Browse files
committed
Add README
1 parent 5167c2c commit 7d5b192

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Yii2 extension for PHPStan
2+
3+
## What does it do?
4+
5+
* Provides correct return type for `Yii::$container->get('service_id')` method,
6+
* Ignore common problems with active record and request/response objects.
7+
8+
## Installation
9+
10+
```sh
11+
composer require --dev proget-hq/phpstan-yii2
12+
```
13+
14+
## Configuration
15+
16+
Put this into your `phpstan.neon` config:
17+
18+
```neon
19+
includes:
20+
- vendor/proget-hq/phpstan-yii2/extension.neon
21+
parameters:
22+
yii2:
23+
config_path: %rootDir%/../../../config/test.php
24+
```
25+
26+
## Limitations
27+
28+
Container closures must have return types.
29+
30+
You have to provide a path to `config/test.php` or other yii2 config file.

0 commit comments

Comments
 (0)