fxpio / composer-asset-plugin

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

Convert bower version notation "1.0.0 - 1.3.x" #222

Closed mmlado closed 8 years ago

mmlado commented 8 years ago

composer require bower-asset/backbone.marionette gives error: Could not parse version constraint <=1.3.x: Invalid version string "1.3.x"

It's dependencies has been updated to: "backbone": "1.0.0 - 1.3.x",

Solution. Convert versions in this format properly. Set the version in question to be < and increment the last number before the x by one. 1.0.0 - 1.3.x => >=1.0.0,<1.4.0 1.0 - 1.x => >=1.0,<2.0

Unit tests added and they work.

Issue fix: https://github.com/francoispluchino/composer-asset-plugin/issues/221

francoispluchino commented 8 years ago

Thank you!

nelson6e65 commented 7 years ago

How can I exclude versions in a range? ^1.0, but excluding from 1.10 to 1.12?

francoispluchino commented 7 years ago

@nelson6e65 I would think to that ^1.0 <1.10 | ^1.0 >1.12. because ^1.0 <1.10 >1.12 is not available.

You can see the Composer versions doc for more details.