function InstallationManager::isPackageInstalled
Checks whether provided package is installed in one of the registered installers.
Parameters
InstalledRepositoryInterface $repo repository in which to check:
PackageInterface $package package instance:
File
-
vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php, line 142
Class
- InstallationManager
- Package operation manager.
Namespace
Composer\InstallerCode
public function isPackageInstalled(InstalledRepositoryInterface $repo, PackageInterface $package) : bool {
if ($package instanceof AliasPackage) {
return $repo->hasPackage($package) && $this->isPackageInstalled($repo, $package->getAliasOf());
}
return $this->getInstaller($package->getType())
->isInstalled($repo, $package);
}