feat: enhance type hints and improve verbosity handling in commands (#1186)

This commit is contained in:
Jerry Ma
2026-06-16 18:50:18 +08:00
committed by GitHub
parent bdc7bbe1f1
commit af771cf2b5
10 changed files with 40 additions and 32 deletions

View File

@@ -75,6 +75,9 @@ class PackageInstaller
}
// special check for php target packages
if (in_array($package->getName(), ['php', 'php-cli', 'php-fpm', 'php-micro', 'php-cgi', 'php-embed', 'frankenphp'], true)) {
if (!$package instanceof TargetPackage) {
throw new WrongUsageException("Package '{$package->getName()}' is expected to be a TargetPackage.");
}
$this->handlePhpTargetPackage($package);
return $this;
}