mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-08 17:35:36 +08:00
Add preInstall stage
This commit is contained in:
@@ -155,6 +155,7 @@ class PackageInstaller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->reconcilePhpSrcVersion();
|
$this->reconcilePhpSrcVersion();
|
||||||
|
$this->emitPreInstallEvents();
|
||||||
|
|
||||||
if ($this->interactive && !$disable_delay_msg) {
|
if ($this->interactive && !$disable_delay_msg) {
|
||||||
// show install or build options in terminal with beautiful output
|
// show install or build options in terminal with beautiful output
|
||||||
@@ -361,6 +362,15 @@ class PackageInstaller
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function emitPreInstallEvents(): void
|
||||||
|
{
|
||||||
|
foreach ($this->packages as $package) {
|
||||||
|
if ($package->hasStage('preInstall')) {
|
||||||
|
$package->runStage('preInstall');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function emitPostInstallEvents(): void
|
public function emitPostInstallEvents(): void
|
||||||
{
|
{
|
||||||
foreach ($this->packages as $package) {
|
foreach ($this->packages as $package) {
|
||||||
|
|||||||
Reference in New Issue
Block a user