Skip to content

Commit 7e29f09

Browse files
committed
getting package details from the project installer
1 parent 0e9ad2f commit 7e29f09

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/PatternLab/InstallerUtil.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -521,21 +521,15 @@ public static function postUpdateCmd($installerInfo, $event) {
521521

522522
/**
523523
* Make sure pattern engines and listeners are removed on uninstall
524-
* @param {Object} a script event object from composer
524+
* @param {String} the name of the package to be removed
525+
* @param {String} the type of the package to be removed
526+
* @param {String} the path of the package to be removed
525527
*/
526-
public static function prePackageUninstallCmd($event) {
528+
public static function prePackageUninstallCmd($name, $type, $pathBase) {
527529

528530
// run the console and config inits
529531
self::init();
530532

531-
// get package info
532-
$package = $event->getOperation()->getPackage();
533-
$type = $package->getType();
534-
$name = $package->getName();
535-
$pathBase = $event->getComposer()->getInstallationManager()->getInstallPath($package);
536-
537-
print "pathBase: ".$pathBase;
538-
539533
// see if the package has a listener and remove it
540534
self::scanForListener($pathBase,true);
541535

0 commit comments

Comments
 (0)