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

Breadcrumb

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

function Request::lockPackage

Mark a package as locked to a specific version but removable

This is used for lock file packages which need to be treated similar to fixed packages by the pool builder in that by default they should really only have the currently present version loaded and no remote alternatives.

However unlike fixed packages there will not be a special rule enforcing their installation for the solver, so if nothing requires these packages they will be removed. Additionally in a partial update these packages can be unlocked, meaning other versions can be installed if explicitly requested as part of the update.

File

vendor/composer/composer/src/Composer/DependencyResolver/Request.php, line 99

Class

Request
@author Nils Adermann <naderman@naderman.de>

Namespace

Composer\DependencyResolver

Code

public function lockPackage(BasePackage $package) : void {
    $this->lockedPackages[spl_object_hash($package)] = $package;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal