From 40497e4f4c56f373c386a062cba84b92e7d0c6a7 Mon Sep 17 00:00:00 2001 From: Philip Hofstetter Date: Thu, 30 Jan 2020 08:28:48 +0100 Subject: [PATCH] document `phpVersion` setting --- docs/running_psalm/configuration.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/running_psalm/configuration.md b/docs/running_psalm/configuration.md index c619d28d668..c85dd87f69b 100644 --- a/docs/running_psalm/configuration.md +++ b/docs/running_psalm/configuration.md @@ -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 + +``` +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