Move all interactive input to construct

This commit is contained in:
crazywhalecc
2026-03-09 11:04:18 +08:00
parent 1f768ffc64
commit 77e129881a
11 changed files with 96 additions and 61 deletions

View File

@@ -443,7 +443,27 @@ trait unix
$package->runStage([$this, 'makeForUnix']);
$package->runStage([$this, 'unixBuildSharedExt']);
$package->runStage([$this, 'smokeTestForUnix']);
}
#[Stage('postInstall')]
public function postInstall(TargetPackage $package, PackageInstaller $installer): void
{
if ($package->getName() === 'frankenphp') {
$package->runStage([$this, 'smokeTestFrankenphpForUnix']);
return;
}
if ($package->getName() !== 'php') {
return;
}
if (SystemTarget::isUnix()) {
if ($installer->interactive) {
InteractiveTerm::indicateProgress('Running PHP smoke tests');
}
$package->runStage([$this, 'smokeTestForUnix']);
if ($installer->interactive) {
InteractiveTerm::finish('PHP smoke tests passed');
}
}
}
/**