Skip to content

Commit 447ffd6

Browse files
committed
Updated README again
1 parent 45cb230 commit 447ffd6

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ This extension provides following features:
1212
* Provides correct return type for `Doctrine\ORM\EntityManager::find`, `getReference` and `getPartialReference` when `Foo::class` entity class name is provided as the first argument
1313
* Adds missing `matching` method on `Doctrine\Common\Collections\Collection`. This can be turned off by setting `parameters.doctrine.allCollectionsSelectable` to `false`.
1414

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+
1532
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:
1633

1734
```neon
@@ -36,18 +53,3 @@ $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
3653
$kernel->boot();
3754
return $kernel->getContainer()->get('doctrine')->getManager();
3855
```
39-
40-
## Usage
41-
42-
To use this extension, require it in [Composer](https://getcomposer.org/):
43-
44-
```
45-
composer require --dev phpstan/phpstan-doctrine
46-
```
47-
48-
And include extension.neon in your project's PHPStan config:
49-
50-
```
51-
includes:
52-
- vendor/phpstan/phpstan-doctrine/extension.neon
53-
```

0 commit comments

Comments
 (0)