PackageUtil
API reference › Foxy › Util › PackageUtil
Hydrates Composer package records stored in lock data.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
loadLockPackage() static | Load the packages in the packages section of the locker load data. | PackageUtil |
loadLockPackages() static | Loads the packages and packages-dev entries of the lock data, leaving every other key unchanged. | PackageUtil |
Method details
Section titled “Method details”loadLockPackage()
Section titled “loadLockPackage() ”public static function loadLockPackage(Composer\Package\Loader\ArrayLoader $loader, array $lockData, bool $dev = false): arrayLoad the packages in the packages section of the locker load data.
Parameters
| Parameter | Type | Description |
|---|---|---|
$loader | Composer\ | The package loader of composer. |
$lockData | array | The lock data of locker. |
$dev | bool | Check if the dev packages must be loaded. |
Returns
array: The lock data
loadLockPackages()
Section titled “loadLockPackages() ”public static function loadLockPackages(array $lockData): arrayLoads the packages and packages-dev entries of the lock data, leaving every other key unchanged.
Parameters
| Parameter | Type | Description |
|---|---|---|
$lockData | array | The raw lock data, as read from the lock file. |
Returns
array: The lock data with package entries replaced by package instances.