mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-02 22:35:43 +08:00
Add preInstall stage
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user