InstalledVersions::isInstalled( string $packageName, bool $includeDevRequirements = true )
Checks whether the given package is installed
Description Description
This also returns true if the package name is provided or replaced by another package
Parameters Parameters
- $packageName
-
(string) (Required)
- $includeDevRequirements
-
(bool) (Optional)
Default value: true
Return Return
(bool)
Source Source
File: libraries/lifterlms-cli/vendor/composer/InstalledVersions.php
public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); } } return false; }
Expand full source code Collapse full source code View on GitHub