phar-io/phive

Phive does not see Infection > 0.24.0

sebastianbergmann opened this issue · 1 comments

$ cat .phive/phars.xml       
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
  <phar name="php-cs-fixer" version="^3.0" installed="3.4.0" location="./tools/php-cs-fixer" copy="true"/>
  <phar name="psalm" version="^4.0" installed="4.18.1" location="./tools/psalm" copy="true"/>
  <phar name="infection" version="^0.24" installed="0.24.0" location="./tools/infection" copy="true"/>
  <phar name="composer" version="^2.0.3" installed="2.2.4" location="./tools/composer" copy="true"/>
</phive>
$ phive update
Phive 0.15.0 - Copyright (C) 2015-2022 by Arne Blankerts, Sebastian Heuer and Contributors
Copying php-cs-fixer-3.4.0.phar to /usr/local/src/code-unit/tools/php-cs-fixer
Copying psalm-4.18.1.phar to /usr/local/src/code-unit/tools/psalm
Copying infection-0.24.0.phar to /usr/local/src/code-unit/tools/infection
Downloading https://api.github.com/repos/composer/composer/releases
Copying composer-2.2.4.phar to /usr/local/src/code-unit/tools/composer

Phive does not see that Infection 0.26.0 is available. When I manually edit .phive/phars.xml ...

$ git diff              
diff --git a/.phive/phars.xml b/.phive/phars.xml
index baeac30..8bdf800 100644
--- a/.phive/phars.xml
+++ b/.phive/phars.xml
@@ -2,6 +2,6 @@
 <phive xmlns="https://phar.io/phive">
   <phar name="php-cs-fixer" version="^3.0" installed="3.4.0" location="./tools/php-cs-fixer" copy="true"/>
   <phar name="psalm" version="^4.0" installed="4.18.1" location="./tools/psalm" copy="true"/>
-  <phar name="infection" version="^0.24" installed="0.24.0" location="./tools/infection" copy="true"/>
+  <phar name="infection" version="^0.26" installed="0.24.0" location="./tools/infection" copy="true"/>
   <phar name="composer" version="^2.0.3" installed="2.2.4" location="./tools/composer" copy="true"/>
 </phive>

... and run phive update again then I get

$ phive update          
Phive 0.15.0 - Copyright (C) 2015-2022 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/releases
Copying php-cs-fixer-3.4.0.phar to /usr/local/src/code-unit/tools/php-cs-fixer
Copying psalm-4.18.1.phar to /usr/local/src/code-unit/tools/psalm
Copying infection-0.26.0.phar to /usr/local/src/code-unit/tools/infection
Downloading https://api.github.com/repos/composer/composer/releases
Copying composer-2.2.4.phar to /usr/local/src/code-unit/tools/composer

I believe that to be working as expected as we are talking about a pre-1.0 release and you use the caret operator (^0.24), which translates to >=0.24 && < 0.25. This is actually identically to how composer treats this.

Or am I missing anything?