diff --git a/src/StaticPHP/Package/PackageInstaller.php b/src/StaticPHP/Package/PackageInstaller.php index 8510a94b..b68c855b 100644 --- a/src/StaticPHP/Package/PackageInstaller.php +++ b/src/StaticPHP/Package/PackageInstaller.php @@ -155,6 +155,7 @@ class PackageInstaller } $this->reconcilePhpSrcVersion(); + $this->emitPreInstallEvents(); if ($this->interactive && !$disable_delay_msg) { // show install or build options in terminal with beautiful output @@ -361,6 +362,15 @@ class PackageInstaller return false; } + public function emitPreInstallEvents(): void + { + foreach ($this->packages as $package) { + if ($package->hasStage('preInstall')) { + $package->runStage('preInstall'); + } + } + } + public function emitPostInstallEvents(): void { foreach ($this->packages as $package) {