Skip to content
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

Display target PHP version #7006

Merged
merged 1 commit into from Nov 27, 2021
Merged

Display target PHP version #7006

merged 1 commit into from Nov 27, 2021

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Nov 27, 2021

Historically it was often not quite clear to users what PHP version Psalm assumes, and why. This PR addresses this issue by printing the version and where we got it from right before scanning the files.

Note that psalm/psalm.dev#69 has to merged first lest psalm.dev sandbox become unusable.

@weirdan weirdan added enhancement release:feature labels Nov 27, 2021
@weirdan weirdan requested a review from orklah Nov 27, 2021
Historically it was often not quite clear to users what PHP version
Psalm assumes, and why. This PR addresses this issue by printing the
version and where we got it from right before scanning the files.

if (isset($options['php-version'])) {
if (!is_string($options['php-version'])) {
die('Expecting a version number in the format x.y' . PHP_EOL);
Copy link
Collaborator

@orklah orklah Nov 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check can be dropped here, it seems to be checked again in project analyzer below

Copy link
Collaborator Author

@weirdan weirdan Nov 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is to avoid MixedAssignment to $version variable.

orklah
orklah approved these changes Nov 27, 2021
Copy link
Collaborator

@orklah orklah left a comment

Oh, that's cool!

@weirdan weirdan merged commit 1797716 into vimeo:master Nov 27, 2021
16 checks passed
@weirdan weirdan deleted the show-php-version branch Nov 27, 2021
@rarila rarila mentioned this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement release:feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants