function VendorHardeningPlugin::getInstallPathForPackage

Same name in other branches
  1. 9 composer/Plugin/VendorHardening/VendorHardeningPlugin.php \Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin::getInstallPathForPackage()
  2. 10 composer/Plugin/VendorHardening/VendorHardeningPlugin.php \Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin::getInstallPathForPackage()

Gets the installed path for a package.

Parameters

\Composer\Package\PackageInterface $package: The package.

Return value

string Path to the install path for the package, relative to the project. This accounts for changes made by composer/installers, if any.

1 call to VendorHardeningPlugin::getInstallPathForPackage()
VendorHardeningPlugin::cleanPathsForPackage in composer/Plugin/VendorHardening/VendorHardeningPlugin.php
Clean the installed directories for a named package.

File

composer/Plugin/VendorHardening/VendorHardeningPlugin.php, line 269

Class

VendorHardeningPlugin
A Composer plugin to clean out your project's vendor directory.

Namespace

Drupal\Composer\Plugin\VendorHardening

Code

protected function getInstallPathForPackage(PackageInterface $package) : string {
    return $this->composer
        ->getInstallationManager()
        ->getInstallPath($package);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.