-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Labels
Description
When use latest composer.phar ( Download from: https://getcomposer.org/composer.phar ), patches fail to apply due to a new exception being thrown by Composer.
In FilesystemRepository.php line 121:
[ArgumentCountError]
Too few arguments to function Composer\Repository\FilesystemRepository::write(), 0 passed in /builds/t1_Pkh-Mg/0/test-app/vendor/vaimo/composer-patches/src/Compatibility/Executor.php on line 19 and exactly 2 expected
Pre-requisites
Composer version 2.8-dev+d0e4fbad7f9957166771bfa614d49e76d27c8606 (2.8-dev) 2025-04-02 11:09:19
vaimo/composer-patches 5.2.0
To Reproduce
Steps to reproduce the behavior:
- Download composer PHAR from: https://getcomposer.org/composer.phar
- Run composer install:
php composer.phar installExpected
Patches apply successfully
Actual
Get error
Notes
Incorrect compare composer version in Executor.php on line 18 and 28:
public function repositoryWrite($repository, $installationManager, $isDevMode)
{
if (version_compare(\Composer\Composer::VERSION, '2.0', '<')) {
$repository->write(); // trigger error for version "2.8-dev+d0e4fbad7f9957166771bfa614d49e76d27c8606 (2.8-dev) 2025-04-02 11:09:19"
return;
}
$repository->write($isDevMode, $installationManager);
}
Reactions are currently unavailable