Skip to content

Commit 45f1c5e

Browse files
committed
Document the drupal_root parameter
Fixes #46
1 parent 931c16e commit 45f1c5e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ includes:
7575

7676
## Adapting to your project
7777

78+
### Specifying your Drupal project's root
79+
80+
By default, the PHPStan Drupal extension will try to determine your Drupal project's root directory based on the working
81+
directory that PHPStan is checking. If this is not working properly, you can explicitly define the Drupal project's root
82+
directory using the `drupal_root` parameter.
83+
84+
```
85+
drupal:
86+
drupal_root: /path/to/drupal
87+
```
88+
89+
You can also use container parameters. For instance you can always set it to the current working directory.
90+
91+
```
92+
drupal:
93+
drupal_root: %currentWorkingDirectory%
94+
```
95+
7896
### Entity storage mappings.
7997

8098
The `EntityTypeManagerGetStorageDynamicReturnTypeExtension` service helps map dynamic return types. This inspects the

0 commit comments

Comments
 (0)