fxpio / composer-asset-plugin

NPM/Bower Dependency Manager for Composer
MIT License
893 stars 156 forks source link

Could not parse version constraint >=N.x. SemverConterter doesn't support wildcards in first part of range #253

Closed lexeo closed 7 years ago

lexeo commented 7 years ago

Same issue like #244 . I tried to install some package from private repository. It requires angular-ui/angular-google-maps. But in bower.json file of angular-google-maps package we can see:

"dependencies": {
    ...
    "lodash": "3.X - 4.X",
    ...
}

and that is why I got the error: Could not parse version constraint >=3.x: Invalid version string "3.x".

So I ran Fxp\Composer\AssetPlugin\Tests\Converter\SemverConverterTest and provided one more example in data-provider method. I expected that '3.x - 4.x' would be converted to '>=3.0,<5.0', but it didn't:

Failed asserting that two strings are equal. Expected :'>=3.0,<5.0' Actual :'>=3.x,<5.0'

Why does SemverConverter replace only second part of the range "3.x - 4.x" ?

francoispluchino commented 7 years ago

Fixed by 4c176fb7d5ecb7cc6e53454c824f02080a6627fe.