phive icon indicating copy to clipboard operation
phive copied to clipboard

Consider Options to support different versions of a package based on requirements

Open theseer opened this issue 8 years ago • 1 comments

Currently, we can either install a fixed version or whatever is latest. Depending on the runtime environment, this may be not good enough. For instance PHPUnit 6.x will not work with PHP 5.6, PHPUnit 5 won't work on the EOL'd PHP 5.3.

Or don't we care?

theseer avatar Apr 17 '17 11:04 theseer

Idea:

We allow multiple version constraints per phar in phive.xml, where each constraint has platform conditions.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
  <phar name="phpab" version="^1.23" installed="1.23.0" location="./tools/phpab"/>
  <phar name="phpunit" location="./tools/phpunit">
    <condition php="^5.6" version="^5.6" installed="5.7.3"/>
    <condition php="^7.0" version="^6.0" installed="6.1.0"/>
  </phar>
</phive>

sebastianheuer avatar Apr 20 '17 16:04 sebastianheuer