public function VendorHardeningPlugin::onPostPackageUpdate in Drupal 8
Same name and namespace in other branches
- 9 composer/Plugin/VendorHardening/VendorHardeningPlugin.php \Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin::onPostPackageUpdate()
POST_PACKAGE_UPDATE event handler.
Parameters
\Composer\Installer\PackageEvent $event:
File
- composer/
Plugin/ VendorHardening/ VendorHardeningPlugin.php, line 154
Class
- VendorHardeningPlugin
- A Composer plugin to clean out your project's vendor directory.
Namespace
Drupal\Composer\Plugin\VendorHardeningCode
public function onPostPackageUpdate(PackageEvent $event) {
/** @var \Composer\Package\CompletePackage $package */
$package = $event
->getOperation()
->getTargetPackage();
$package_name = $package
->getName();
$this
->cleanPackage($this->composer
->getConfig()
->get('vendor-dir'), $package_name);
}