Skip to content

Composer package versions#3335

Merged
jasonvarga merged 1 commit intomasterfrom
fix/versions
Mar 4, 2021
Merged

Composer package versions#3335
jasonvarga merged 1 commit intomasterfrom
fix/versions

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

This fixes an issue where $this->isUpdatingTo('3.1') wouldn't work but 3.1.0 would.

This also scraps our version normalizing code in favor of Composer's. They already have a full-fledged thing.
But since their method normalizes the versions to 4 digits (e.g. 3.0.0.0), I've made a separate getNormalizedInstalledVersion that does the normalizing. getInstalledVersion just uses whatever is actually installed with Composer.

This lets us use the normalized version for version_compare, but the regular one for displaying.

Comment thread tests/Composer/ComposerLockTest.php
@jasonvarga jasonvarga merged commit 3fded39 into master Mar 4, 2021
@jasonvarga jasonvarga deleted the fix/versions branch March 4, 2021 21:11
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.

2 participants