You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-15Lines changed: 17 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,23 @@ This extension provides following features:
12
12
* Provides correct return type for `Doctrine\ORM\EntityManager::find`, `getReference` and `getPartialReference` when `Foo::class` entity class name is provided as the first argument
13
13
* Adds missing `matching` method on `Doctrine\Common\Collections\Collection`. This can be turned off by setting `parameters.doctrine.allCollectionsSelectable` to `false`.
14
14
15
+
## Usage
16
+
17
+
To use this extension, require it in [Composer](https://getcomposer.org/):
18
+
19
+
```
20
+
composer require --dev phpstan/phpstan-doctrine
21
+
```
22
+
23
+
And include extension.neon in your project's PHPStan config:
24
+
25
+
```
26
+
includes:
27
+
- vendor/phpstan/phpstan-doctrine/extension.neon
28
+
```
29
+
30
+
## Configuration
31
+
15
32
If your repositories have a common base class, you can configure it in your `phpstan.neon` and PHPStan will see additional methods you define in it:
16
33
17
34
```neon
@@ -36,18 +53,3 @@ $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
0 commit comments