fxpio / foxy

A fast, reliable, and secure NPM/Yarn/pnpm bridge for Composer
https://foxypkg.com
MIT License
173 stars 21 forks source link

Fixed compatibility with composer 2.1 #38

Closed SamMousa closed 3 years ago

SamMousa commented 3 years ago

Fixes #37

dsturm commented 3 years ago

Hej @SamMousa,

shouldn't we check, whether Composer::RUNTIME_API_VERSION is at least 2.0.0 and therefor use

version_compare(Composer::RUNTIME_API_VERSION, '2.0.0', '>=')

Or is there a reason to explicitly check for 2.0.0 and 2.1.0?

francoispluchino commented 3 years ago

@SamMousa It is preferable to use version_compare function.

SamMousa commented 3 years ago

I used strict comparison because that's what was done in original code. I'm fine updating it to use version compare

francoispluchino commented 3 years ago

Yes, please, you might as well improve the code immediately :-)

SamMousa commented 3 years ago

@francoispluchino, the PR is done but CI is broken.

SamMousa commented 3 years ago

Bump

francoispluchino commented 3 years ago

Thank you!