$package) { // only add target that contains artifact.source if ($package->hasStage('build')) { logger()->debug("Registering build target command for package: {$name}"); $this->addCommand(new BuildTargetCommand($name)); } } // add core commands $this->addCommands([ new DownloadCommand(), new DoctorCommand(), new InstallPackageCommand(), new BuildLibsCommand(), new ExtractCommand(), new SPCConfigCommand(), // dev commands new ShellCommand(), new IsInstalledCommand(), new EnvCommand(), new SortConfigCommand(), ]); // add additional commands from registries if (!empty(self::$additional_commands)) { $this->addCommands(self::$additional_commands); } } /** * @internal */ public static function _addAdditionalCommands(array $additional_commands): void { self::$additional_commands = array_merge(self::$additional_commands, $additional_commands); } }