Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. InstallationManager.php

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\Installer

Code

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);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal