diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index de1516f7d..9a7da447d 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -414,7 +414,7 @@ class Factory $locker = new Package\Locker($io, new JsonFile($config->get('lock') ? $lockFile : Platform::getDevNull(), null, $io), $im, file_get_contents($composerFile), $process); $composer->setLocker($locker); } elseif ($composer instanceof Composer) { - $locker = new Package\Locker($io, new JsonFile(Platform::getDevNull(), null, $io), $im, json_encode($localConfig), $process); + $locker = new Package\Locker($io, new JsonFile(Platform::getDevNull(), null, $io), $im, JsonFile::encode($localConfig), $process); $composer->setLocker($locker); }