fxpio / composer-asset-plugin

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

Ignore packages versions that are not supported by Composer #258

Closed nazar-pc closed 7 years ago

nazar-pc commented 7 years ago

This should fix installation of immutable from NPM (https://www.npmjs.com/package/immutable) which appears to contain version 0.8.0-SNAPSHOT which causes exception in Composer's version normalization.

There shouldn't be any major or even minor issues with this fix. It will allow to install NPM packages, that contain appropriate version (while skipping versions like mentioned above) as well as still fail for packages that do not have any version that can be parsed by Composer.

Sorry for not adding any test case, I've tried, but failed to write correct one. Feel free to push more commits into this branch if needed, you should be able to do so.

nazar-pc commented 7 years ago

@cebe, @francoispluchino, do you see any other issues with this PR?

francoispluchino commented 7 years ago

All versions must be compatible with Composer. If this is not the case, it's a bug. The snapshot version is now compatible (see #261).