2023-03-15 20:40:49 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace SPC;
|
|
|
|
|
|
2023-09-12 16:27:07 +02:00
|
|
|
use SPC\command\BuildCliCommand;
|
|
|
|
|
use SPC\command\BuildLibsCommand;
|
2024-02-18 13:54:06 +08:00
|
|
|
use SPC\command\DeleteDownloadCommand;
|
2023-09-12 16:27:07 +02:00
|
|
|
use SPC\command\dev\AllExtCommand;
|
2024-05-29 13:53:08 +08:00
|
|
|
use SPC\command\dev\GenerateExtDocCommand;
|
2023-09-12 16:27:07 +02:00
|
|
|
use SPC\command\dev\PhpVerCommand;
|
|
|
|
|
use SPC\command\dev\SortConfigCommand;
|
|
|
|
|
use SPC\command\DoctorCommand;
|
|
|
|
|
use SPC\command\DownloadCommand;
|
|
|
|
|
use SPC\command\DumpLicenseCommand;
|
|
|
|
|
use SPC\command\ExtractCommand;
|
2024-02-18 13:54:06 +08:00
|
|
|
use SPC\command\InstallPkgCommand;
|
2023-09-12 16:27:07 +02:00
|
|
|
use SPC\command\MicroCombineCommand;
|
2024-05-21 14:56:54 +08:00
|
|
|
use SPC\command\SwitchPhpVersionCommand;
|
2023-03-15 20:40:49 +08:00
|
|
|
use Symfony\Component\Console\Application;
|
|
|
|
|
|
|
|
|
|
/**
|
2023-08-20 19:51:45 +08:00
|
|
|
* static-php-cli console app entry
|
2023-03-15 20:40:49 +08:00
|
|
|
*/
|
2023-09-12 16:27:07 +02:00
|
|
|
final class ConsoleApplication extends Application
|
2023-03-15 20:40:49 +08:00
|
|
|
{
|
2024-06-30 00:08:20 +08:00
|
|
|
public const VERSION = '2.3.0';
|
2023-03-15 20:40:49 +08:00
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct('static-php-cli', self::VERSION);
|
|
|
|
|
|
2023-09-12 16:27:07 +02:00
|
|
|
$this->addCommands(
|
|
|
|
|
[
|
2024-03-31 15:36:38 +08:00
|
|
|
// Common commands
|
2023-09-12 16:27:07 +02:00
|
|
|
new BuildCliCommand(),
|
|
|
|
|
new BuildLibsCommand(),
|
|
|
|
|
new DoctorCommand(),
|
|
|
|
|
new DownloadCommand(),
|
2024-02-18 13:54:06 +08:00
|
|
|
new InstallPkgCommand(),
|
|
|
|
|
new DeleteDownloadCommand(),
|
2023-09-12 16:27:07 +02:00
|
|
|
new DumpLicenseCommand(),
|
|
|
|
|
new ExtractCommand(),
|
|
|
|
|
new MicroCombineCommand(),
|
2024-05-21 14:56:54 +08:00
|
|
|
new SwitchPhpVersionCommand(),
|
2023-09-12 16:27:07 +02:00
|
|
|
|
|
|
|
|
// Dev commands
|
|
|
|
|
new AllExtCommand(),
|
|
|
|
|
new PhpVerCommand(),
|
|
|
|
|
new SortConfigCommand(),
|
2024-05-29 13:53:08 +08:00
|
|
|
new GenerateExtDocCommand(),
|
2023-09-12 16:27:07 +02:00
|
|
|
]
|
|
|
|
|
);
|
2023-03-15 20:40:49 +08:00
|
|
|
}
|
|
|
|
|
}
|