New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add <psalm phpVersion="7.2"
support to psalm.xml
#2628
Comments
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 |
I get this error:
🤔 |
|
It works with the |
Another idea would be to get the version from the minimum specified in I'll try my hands on a PR |
if a composer.json is present and a PHP version requirement is configured, we set the php version to the minimal PHP version that satisfies the composer requirement. Additionally, this adds a `phpVersion` attribute to the <psalm> tag. If that's set, it takes precedence over what has been detected in composer.json. And finally, the --php-version command line flag continues to work and takes precedence over the setting in the <psalm> tag this fixes vimeo#2628
if a composer.json is present and a PHP version requirement is configured, we set the php version to the minimal PHP version that satisfies the composer requirement. Additionally, this adds a `phpVersion` attribute to the <psalm> tag. If that's set, it takes precedence over what has been detected in composer.json. And finally, the --php-version command line flag continues to work and takes precedence over the setting in the <psalm> tag this fixes vimeo#2628
if a composer.json is present and a PHP version requirement is configured, we set the php version to the minimal PHP version that satisfies the composer requirement. Additionally, this adds a `phpVersion` attribute to the <psalm> tag. If that's set, it takes precedence over what has been detected in composer.json. And finally, the --php-version command line flag continues to work and takes precedence over the setting in the <psalm> tag this fixes #2628
(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.The text was updated successfully, but these errors were encountered: