function Locker::__construct
Initializes packages locker.
Parameters
JsonFile $lockFile lockfile loader:
InstallationManager $installationManager installation manager instance:
string $composerFileContents The contents of the composer file:
File
-
vendor/
composer/ composer/ src/ Composer/ Package/ Locker.php, line 65
Class
- Locker
- Reads/writes project lockfile (composer.lock).
Namespace
Composer\PackageCode
public function __construct(IOInterface $io, JsonFile $lockFile, InstallationManager $installationManager, string $composerFileContents, ?ProcessExecutor $process = null) {
$this->lockFile = $lockFile;
$this->installationManager = $installationManager;
$this->hash = hash('md5', $composerFileContents);
$this->contentHash = self::getContentHash($composerFileContents);
$this->loader = new ArrayLoader(null, true);
$this->dumper = new ArrayDumper();
$this->process = $process ?? new ProcessExecutor($io);
}