public function VendorHardeningPlugin::onPrePackageInstall in Drupal 10
Same name and namespace in other branches
- 8 composer/Plugin/VendorHardening/VendorHardeningPlugin.php \Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin::onPrePackageInstall()
- 9 composer/Plugin/VendorHardening/VendorHardeningPlugin.php \Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin::onPrePackageInstall()
PRE_PACKAGE_INSTALL event handler.
Parameters
\Composer\Installer\PackageEvent $event: The package event.
File
- composer/
Plugin/ VendorHardening/ VendorHardeningPlugin.php, line 122
Class
- VendorHardeningPlugin
- A Composer plugin to clean out your project's vendor directory.
Namespace
Drupal\Composer\Plugin\VendorHardeningCode
public function onPrePackageInstall(PackageEvent $event) {
/** @var \Composer\Package\CompletePackage $package */
$package = $event
->getOperation()
->getPackage();
$this
->removeBinBeforeCleanup($package);
}