(the syntax isn't important)
Related to #1191
Some applications will only be deployed on one version of php most of the time.
It's inconvenient to add --php-version 7.2 to all invocations (language server, manual runs, etc).
--php-version should override the psalm.xml setting.
Hey @TysonAndre, can you reproduce the issue on https://psalm.dev ?
Just looking for a way to specify the PHP version supported: so, currently there is no way to specifcy which version to check against? Because Psalm warns that I can add a type hint to method param, but I cannot as the interface doesn't have one and the concrete method cannot add it without breaking the code on PHP 7.2.
@Aerendir it's not possible to specify in the config currently, but you can pass --php-version 7.2 in cli arguments.
--php-version 7.2
I get this error:
Cannot local 7.2
馃
--php-version 7.2
I get this error:
Cannot local 7.2
馃
--php-version=7.2
It works with the = sign, but it should be able to read it also without it 馃Anyway, it works...
Another idea would be to get the version from the minimum specified in composer.json if one is present.
I'll try my hands on a PR
Most helpful comment
--php-version=7.2