$package) { // only add target that contains artifact.source if ($package->hasStage('build')) { logger()->debug("Registering build target command for package: {$name}"); $this->add(new BuildTargetCommand($name)); } } $this->addCommands([ new DownloadCommand(), new DoctorCommand(), new InstallPackageCommand(), new BuildLibsCommand(), new ExtractCommand(), new SPCConfigCommand(), ]); // 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); } }