Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Locker.php

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\Package

Code

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);
}
RSS feed
Powered by Drupal