$lockFile
$lockFile :
Reads/writes project lockfile (composer.lock).
__construct(\Composer\IO\IOInterface $io, \Composer\Json\JsonFile $lockFile, \Composer\Repository\RepositoryManager $repositoryManager, \Composer\Installer\InstallationManager $installationManager, string $composerFileContents)
Initializes packages locker.
\Composer\IO\IOInterface | $io | |
\Composer\Json\JsonFile | $lockFile | lockfile loader |
\Composer\Repository\RepositoryManager | $repositoryManager | repository manager instance |
\Composer\Installer\InstallationManager | $installationManager | installation manager instance |
string | $composerFileContents | The contents of the composer file |
getLockedRepository(boolean $withDevReqs = false) : \Composer\Repository\RepositoryInterface
Searches and returns an array of locked packages, retrieved from registered repositories.
boolean | $withDevReqs | true to retrieve the locked dev packages |
getPlatformRequirements(boolean $withDevReqs = false) : array<mixed,\Composer\Package\Link>
Returns the platform requirements stored in the lock file
boolean | $withDevReqs | if true, the platform requirements from the require-dev block are also returned |
setLockData(array $packages, mixed $devPackages, array $platformReqs, mixed $platformDevReqs, array $aliases, string $minimumStability, array $stabilityFlags, boolean $preferStable, boolean $preferLowest, array $platformOverrides) : boolean
Locks provided data into lockfile.
array | $packages | array of packages |
mixed | $devPackages | array of dev packages or null if installed without --dev |
array | $platformReqs | array of package name => constraint for required platform packages |
mixed | $platformDevReqs | array of package name => constraint for dev-required platform packages |
array | $aliases | array of aliases |
string | $minimumStability | |
array | $stabilityFlags | |
boolean | $preferStable | |
boolean | $preferLowest | |
array | $platformOverrides |
getPackageTime(\Composer\Package\PackageInterface $package) : string|null
Returns the packages's datetime for its source reference.
\Composer\Package\PackageInterface | $package | The package to scan. |
The formatted datetime or null if none was found.