mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-03-18 04:44:53 +08:00
phpstan, package display message enhance
This commit is contained in:
parent
bbab685247
commit
bc7ac812b1
@ -175,6 +175,7 @@ abstract class SPCException extends \Exception
|
|||||||
$package_type = match (true) {
|
$package_type = match (true) {
|
||||||
$package instanceof LibraryPackage => 'library',
|
$package instanceof LibraryPackage => 'library',
|
||||||
$package instanceof PhpExtensionPackage => 'php-extension',
|
$package instanceof PhpExtensionPackage => 'php-extension',
|
||||||
|
/* @phpstan-ignore-next-line */
|
||||||
$package instanceof TargetPackage => 'target',
|
$package instanceof TargetPackage => 'target',
|
||||||
default => 'package',
|
default => 'package',
|
||||||
};
|
};
|
||||||
@ -197,6 +198,7 @@ abstract class SPCException extends \Exception
|
|||||||
$this->package_builder_info = [
|
$this->package_builder_info = [
|
||||||
'file' => $frame['file'] ?? null,
|
'file' => $frame['file'] ?? null,
|
||||||
'line' => $frame['line'] ?? null,
|
'line' => $frame['line'] ?? null,
|
||||||
|
/* @phpstan-ignore-next-line */
|
||||||
'method' => $frame['function'] ?? null,
|
'method' => $frame['function'] ?? null,
|
||||||
];
|
];
|
||||||
continue;
|
continue;
|
||||||
@ -207,6 +209,7 @@ abstract class SPCException extends \Exception
|
|||||||
$this->package_installer_info = [
|
$this->package_installer_info = [
|
||||||
'file' => $frame['file'] ?? null,
|
'file' => $frame['file'] ?? null,
|
||||||
'line' => $frame['line'] ?? null,
|
'line' => $frame['line'] ?? null,
|
||||||
|
/* @phpstan-ignore-next-line */
|
||||||
'method' => $frame['function'] ?? null,
|
'method' => $frame['function'] ?? null,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -629,7 +629,11 @@ class PackageInstaller
|
|||||||
InteractiveTerm::notice('Installation summary:');
|
InteractiveTerm::notice('Installation summary:');
|
||||||
$summary['Packages to be built'] = implode(',', array_map(fn ($x) => $x->getName(), array_values($this->build_packages)));
|
$summary['Packages to be built'] = implode(',', array_map(fn ($x) => $x->getName(), array_values($this->build_packages)));
|
||||||
$summary['Packages to be installed'] = implode(',', array_map(fn ($x) => $x->getName(), array_values($this->packages)));
|
$summary['Packages to be installed'] = implode(',', array_map(fn ($x) => $x->getName(), array_values($this->packages)));
|
||||||
$summary['Artifacts to be downloaded'] = implode(',', array_map(fn ($x) => $x->getName(), $this->getArtifacts()));
|
if (!($this->options['no-download'] ?? false)) {
|
||||||
|
$summary['Artifacts to be downloaded'] = implode(',', array_map(fn ($x) => $x->getName(), $this->getArtifacts()));
|
||||||
|
} else {
|
||||||
|
$summary['Artifacts to be downloaded'] = 'none (--no-download option enabled)';
|
||||||
|
}
|
||||||
$this->printArrayInfo(array_filter($summary));
|
$this->printArrayInfo(array_filter($summary));
|
||||||
echo PHP_EOL;
|
echo PHP_EOL;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user