is it possible to tell composer to install a dependency only when using specified PHP versions?
Reason: my library uses password_hash function, which is available in 5.5+, and there is a compatibility library ircmaxell/password-compat for PHP 5.4. However installing this library on PHP 5.5+ is completely pointless. So, Is it possible to tell composer to install ircmaxell/password-compat only when running on versions <5.5?
Short story to make the question more clear - I want to tell composer to:
IF php version < 5.5:
install ircmaxell/password-compat
ELSE:
skip ircmaxell/password-compat
Thanks in advance.
P.S. Please posts only direct answers how to do this, not any workarounds or suggestions to drop 5.4 support. I can also come up with them, I am looking for the smart solution here :)
There are 3 main parts in the composer.json,
Look at PART 3"require": { "php": ">=5.3.2", "kriswallsmith/Buzz": ">=0.5" }
But I may be wrong