Closed Defcon0 closed 3 years ago
At first glance, it looks like he had some changes at the level of the manufacturer of the Locker.
Actually @francoispluchino it is a simpler issue:
public static function getLocker(IOInterface $io, RepositoryManager $rm, InstallationManager $im, $composerFile)
{
$lockFile = str_replace('.json', '.lock', $composerFile);
// @codeCoverageIgnoreStart
return \defined('Composer\Composer::RUNTIME_API_VERSION') && '2.0.0' === Composer::RUNTIME_API_VERSION
? new Locker($io, new JsonFile($lockFile, null, $io), $im, file_get_contents($composerFile))
: new Locker($io, new JsonFile($lockFile, null, $io), $rm, $im, file_get_contents($composerFile));
}
The fix you created for 2.0 is not being applied to 2.1!
I'm getting this error with Composer version 2.2.6:
Fatal error: Uncaught TypeError: Argument 3 passed to Composer\Package\Locker::__construct() must be an instance of Composer\Installer\InstallationManager, instance of Composer\Repository\RepositoryManager given, called in /Users/[redacted]/.composer/vendor/foxy/foxy/Util/LockerUtil.php on line 41 and defined in phar:///usr/local/bin/composer/src/Composer/Package/Locker.php:63
Stack trace:
#0 /Users/[redacted]/.composer/vendor/foxy/foxy/Util/LockerUtil.php(41): Composer\Package\Locker->__construct(Object(Composer\IO\ConsoleIO), Object(Composer\Json\JsonFile), Object(Composer\Repository\RepositoryManager), Object(Composer\Installer\InstallationManager), '{\n "name": "pa...')
#1 /Users/[redacted]/.composer/vendor/foxy/foxy/Fallback/ComposerFallback.php(101): Foxy\Util\LockerUtil::getLocker(Object(Composer\IO\ConsoleIO), Object(Composer\Repository\RepositoryManager), Object(Composer\Installer\InstallationManager), './composer.json')
#2 /Users/[redacted]/.composer/vendor/foxy/foxy/Foxy.php(179): Foxy\Fallback\ComposerFallback->save()
#3 [in in phar:///usr/local/bin/composer/src/Composer/Package/Locker.php on line 63
@rjbain Fixed in v1.1.1, but you can use the last stable version v1.1.2.
Hello,
I tested foxy with the new composer version 2.1 with the following result:
It seems foxy is not yet compatible with 2.1, or do I need to configure something?
Thanks!
Bye Defcon0