Skip to content

Commit

Permalink
document phpVersion setting
Browse files Browse the repository at this point in the history
  • Loading branch information
pilif committed Jan 30, 2020
1 parent 3d634b6 commit 2be6bbf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/running_psalm/configuration.md
Expand Up @@ -244,6 +244,16 @@ Setting to `false` prevents the stub from loading.
```
When `true`, Psalm will complain when referencing an explicit string offset on an array e.g. `$arr['foo']` without a user first asserting that it exists (either via an `isset` check or via an object-like array). Defaults to `false`.

#### phpVersion
```xml
<psalm
phpVersion="[string]"
>
```
Set the php version psalm should assume when checking and/or fixing the project. If this attribute is not set, psalm uses the declaration in `composer.json` if one is present. It will check against the earliest version of PHP that satisfies the declared `php` dependency

This can be overridden on the command-line using the `--php-version=` flag which takes the highest precedence over both the `phpVersion` setting and the version derived from `composer.json`.

### Running Psalm

#### autoloader
Expand Down

0 comments on commit 2be6bbf

Please sign in to comment.