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

Fixed type hint error when the package's pretty_version is null. #30

Closed
wants to merge 2 commits into from

Conversation

limingxinleo
Copy link

@limingxinleo limingxinleo commented Jan 28, 2021

fix #24

@limingxinleo
Copy link
Author

InstalledVersions::getPrettyVersion and InstalledVersions::getReference will be return null sometimes.

@limingxinleo
Copy link
Author

Could you please take a look ?

Thanks

@Jean85
Copy link
Owner

Jean85 commented Jan 28, 2021

Thank you for this PR, I was looking into this same issue because I was getting CI failures in getsentry/sentry-php#1170

While debugging there, I've found that the issue that caused that was the fact that I was asking for the version of a replaced package; so, returning a version there doesn't make sense.

What's your use case here then? I see that You're splitting ||, but that to me seems like you're working on a composer.json constraint, and not an exact version.

@Jean85
Copy link
Owner

Jean85 commented Jan 28, 2021

This seems the same stuff that I tried tackling in #16...

@limingxinleo
Copy link
Author

Sure, it is not an exact version.

It is a guess version.

@Jean85
Copy link
Owner

Jean85 commented Jan 28, 2021

Not a guess, it's a constraint, see the excellent explanation by Jordi (Composer creator) in #16 (comment).

I'm closing this in favor of #31, which is my proposed solution for this issue.

@Jean85 Jean85 closed this Jan 28, 2021
@limingxinleo limingxinleo deleted the 2.x-dev branch January 28, 2021 12:26
@limingxinleo
Copy link
Author

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prettify "No version set"
2 participants