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-06-30 22:37:01 +08:00
|
|
|
use SPC\command\dev\ExtVerCommand;
|
2024-08-21 11:08:57 +08:00
|
|
|
use SPC\command\dev\GenerateExtDepDocsCommand;
|
2024-05-29 13:53:08 +08:00
|
|
|
use SPC\command\dev\GenerateExtDocCommand;
|
2024-08-21 11:08:57 +08:00
|
|
|
use SPC\command\dev\GenerateLibDepDocsCommand;
|
2024-06-30 22:37:01 +08:00
|
|
|
use SPC\command\dev\LibVerCommand;
|
2024-07-07 20:45:18 +08:00
|
|
|
use SPC\command\dev\PackLibCommand;
|
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;
|
2025-03-07 03:46:07 +01:00
|
|
|
use SPC\command\DumpExtensionsCommand;
|
2023-09-12 16:27:07 +02:00
|
|
|
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-12-10 23:09:00 +08:00
|
|
|
use SPC\command\SPCConfigCommand;
|
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
|
|
|
{
|
2025-03-07 18:06:32 +08:00
|
|
|
public const VERSION = '2.5.0';
|
2023-03-15 20:40:49 +08:00
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct('static-php-cli', self::VERSION);
|
|
|
|
|
|
2024-10-01 15:37:37 +08:00
|
|
|
// Define internal env vars and constants
|
|
|
|
|
require_once ROOT_DIR . '/src/globals/internal-env.php';
|
|
|
|
|
|
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(),
|
2024-12-10 23:09:00 +08:00
|
|
|
new SPCConfigCommand(),
|
2025-03-07 03:46:07 +01:00
|
|
|
new DumpExtensionsCommand(),
|
2023-09-12 16:27:07 +02:00
|
|
|
|
|
|
|
|
// Dev commands
|
|
|
|
|
new AllExtCommand(),
|
|
|
|
|
new PhpVerCommand(),
|
2024-06-30 22:37:01 +08:00
|
|
|
new LibVerCommand(),
|
|
|
|
|
new ExtVerCommand(),
|
2023-09-12 16:27:07 +02:00
|
|
|
new SortConfigCommand(),
|
2024-05-29 13:53:08 +08:00
|
|
|
new GenerateExtDocCommand(),
|
2024-08-21 11:08:57 +08:00
|
|
|
new GenerateExtDepDocsCommand(),
|
|
|
|
|
new GenerateLibDepDocsCommand(),
|
2024-07-07 20:45:18 +08:00
|
|
|
new PackLibCommand(),
|
2023-09-12 16:27:07 +02:00
|
|
|
]
|
|
|
|
|
);
|
2023-03-15 20:40:49 +08:00
|
|
|
}
|
|
|
|
|
}
|