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\DependencyResolverCode
public function lockPackage(BasePackage $package) : void {
$this->lockedPackages[spl_object_hash($package)] = $package;
}