Skip to content

Commit 3f60b9f

Browse files
committed
Installation instructions
1 parent c7be305 commit 3f60b9f

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,40 @@ This extension provides following features:
1717
* Notifies you when you try to get a private service from the container.
1818
* Optionally correct return types for `InputInterface::getArgument()`, `::getOption`, `::hasArgument`, and `::hasOption`.
1919

20-
## Usage
20+
21+
## Installation
2122

2223
To use this extension, require it in [Composer](https://getcomposer.org/):
2324

24-
```bash
25+
```
2526
composer require --dev phpstan/phpstan-symfony
2627
```
2728

28-
And include extension.neon in your project's PHPStan config:
29+
If you also install [phpstan/extension-installer](https://github.com/phpstan/extension-installer) then you're all set!
30+
31+
<details>
32+
<summary>Manual installation</summary>
33+
34+
If you don't want to use `phpstan/extension-installer`, include extension.neon in your project's PHPStan config:
2935

3036
```
3137
includes:
32-
- vendor/phpstan/phpstan-symfony/extension.neon
38+
- vendor/phpstan/phpstan-symfony/extension.neon
39+
```
40+
</details>
41+
42+
# Configuration
43+
44+
You have to provide a path to `srcDevDebugProjectContainer.xml` or similar XML file describing your container.
45+
46+
```
3347
parameters:
34-
symfony:
35-
container_xml_path: %rootDir%/../../../var/cache/dev/srcDevDebugProjectContainer.xml
36-
# or with Symfony 4.2+
37-
container_xml_path: '%rootDir%/../../../var/cache/dev/srcApp_KernelDevDebugContainer.xml'
48+
symfony:
49+
container_xml_path: %rootDir%/../../../var/cache/dev/srcDevDebugProjectContainer.xml
50+
# or with Symfony 4.2+
51+
container_xml_path: '%rootDir%/../../../var/cache/dev/srcApp_KernelDevDebugContainer.xml'
3852
```
3953

40-
You have to provide a path to `srcDevDebugProjectContainer.xml` or similar xml file describing your container.
4154

4255
## Constant hassers
4356

@@ -49,7 +62,7 @@ if ($this->has('service')) {
4962
}
5063
```
5164

52-
In that case, you can disable the `::has()` method return type resolving like this:
65+
In that case, you can disable the `::has()` method return type resolving like this:
5366

5467
```
5568
parameters:

0 commit comments

Comments
 (0)