InstalledVersions::reload( array[] $data )
Lets you reload the static array from another file
Description Description
This is only useful for complex integrations in which a project needs to use this class but then also needs to execute another project’s autoloader in process, and wants to ensure both projects have access to their version of installed.php.
A typical case would be PHPUnit, where it would need to make sure it reads all the data it needs from this class, then call reload() with require $CWD/vendor/composer/installed.php
(or similar) as input to make sure the project in which it runs can then also use this class safely, without interference between PHPUnit’s dependencies and the project’s dependencies.
Parameters Parameters
- $data
-
(array[]) (Required) A vendor/composer/installed.php data set
Return Return
(void)
Source Source
File: libraries/lifterlms-cli/vendor/composer/InstalledVersions.php
public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); }
Expand full source code Collapse full source code View on GitHub