function InstallationManager::ensureBinariesPresence
Install binary for the given package. If the installer associated to this package doesn't handle that function, it'll do nothing.
Parameters
PackageInterface $package Package instance:
File
-
vendor/
composer/ composer/ src/ Composer/ Installer/ InstallationManager.php, line 157
Class
- InstallationManager
- Package operation manager.
Namespace
Composer\InstallerCode
public function ensureBinariesPresence(PackageInterface $package) : void {
try {
$installer = $this->getInstaller($package->getType());
} catch (\InvalidArgumentException $e) {
// no installer found for the current package type (@see `getInstaller()`)
return;
}
// if the given installer support installing binaries
if ($installer instanceof BinaryPresenceInterface) {
$installer->ensureBinariesPresence($package);
}
}