Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
akondas committed Mar 6, 2018
1 parent 5167c2c commit 7d5b192
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 7d5b192

Please sign in to comment.