1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Add documentation for enableExtensions and disableExtensions.

This commit is contained in:
AndrolGenhald 2021-12-09 17:01:40 -06:00
parent 8132b57881
commit 5cd3b68ab3

View File

@ -252,6 +252,7 @@ When `true`, Psalm will report all `@psalm-suppress` annotations that aren't use
loadXdebugStub="[bool]"
>
```
Deprecated, use <enableExtensions> instead.
If not present, Psalm will only load the Xdebug stub if Psalm has unloaded the extension.
When `true`, Psalm will load the Xdebug extension stub (as the extension is unloaded when Psalm runs).
Setting to `false` prevents the stub from loading.
@ -336,7 +337,7 @@ When `false`, Psalm will not consider issue at lower level than `errorLevel` as
#### allowNamedArgumentCalls
```xml
<psalm
<psalm
allowNamedArgumentCalls="[bool]"
>
```
@ -432,6 +433,23 @@ Optional. Same format as `<projectFiles>`. Directories Psalm should load but not
#### &lt;fileExtensions&gt;
Optional. A list of extensions to search over. See [Checking non-PHP files](checking_non_php_files.md) to understand how to extend this.
#### &lt;enableExtensions&gt;
Optional. A list of extensions to enable. By default, only extensions required by your composer.json will be enabled.
```xml
<enableExtensions>
<extension name="decimal"/>
<extension name="pdo"/>
</enableExtensions>
```
#### &lt;disableExtensions&gt;
Optional. A list of extensions to disable. By default, only extensions required by your composer.json will be enabled.
```xml
<disableExtensions>
<extension name="gmp"/>
</disableExtensions>
```
#### &lt;plugins&gt;
Optional. A list of `<plugin filename="path_to_plugin.php" />` entries. See the [Plugins](plugins/using_plugins.md) section for more information.
@ -483,7 +501,7 @@ The following configuration declares custom types for super-globals (`$GLOBALS`
```xml
<globals>
<var name="$GLOBALS" type="array{DB: MyVendor\DatabaseConnection, VIEW: MyVendor\TemplateView}" />
<var name="$_GET" type="array{data: array<string, string>}" />
<var name="$_GET" type="array{data: array<string, string>}" />
</globals>
```