From 10bd69062e80ce93a5ab9b7564f2ded1d821c0e5 Mon Sep 17 00:00:00 2001 From: CyberVitexus Date: Sun, 1 Mar 2026 14:52:13 +0100 Subject: [PATCH 1/2] Fix: pass RunTemplate object instead of int to prepareJob() The schedule action was passing $rt->getMyKey() (int) to Job::prepareJob() which expects a RunTemplate object as its first argument. Co-Authored-By: Oz --- src/Command/RunTemplateCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/RunTemplateCommand.php b/src/Command/RunTemplateCommand.php index 30a5456..1c08152 100644 --- a/src/Command/RunTemplateCommand.php +++ b/src/Command/RunTemplateCommand.php @@ -565,7 +565,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $isImmediate = ($scheduleDateTime->getTimestamp() <= $now->getTimestamp() + 5); // 5 sec tolerance $scheduleType = $isImmediate ? 'adhoc' : 'cli'; - $prepared = $jobber->prepareJob($rt->getMyKey(), $overridedEnv, $scheduleDateTime, $executor, $scheduleType); + $prepared = $jobber->prepareJob($rt, $overridedEnv, $scheduleDateTime, $executor, $scheduleType); // scheduleJobRun() is now called automatically inside prepareJob() if ($format === 'json') { From c14d4b6e19cb6a500ae3b42fcc3252b7238391b8 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Sun, 1 Mar 2026 13:53:52 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`fix?= =?UTF-8?q?/runtemplate-schedule-type-error`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @Vitexus. The following files were modified: * `src/Command/RunTemplateCommand.php` --- src/Command/RunTemplateCommand.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Command/RunTemplateCommand.php b/src/Command/RunTemplateCommand.php index 1c08152..27ed350 100644 --- a/src/Command/RunTemplateCommand.php +++ b/src/Command/RunTemplateCommand.php @@ -156,6 +156,15 @@ protected function parseConfigOptions(InputInterface $input): array return $result; } + /** + * Handle the "runtemplate" CLI command performing actions such as list, get, create, update, delete, and schedule, and emit results to the provided output. + * + * Supports resolving company slugs/IDs, resolving app UUIDs, applying command-line config overrides, and formatting output as JSON or text. + * + * @param InputInterface $input Console input containing the action argument and command options. + * @param OutputInterface $output Console output used for writing messages and serialized results. + * @return int One of MultiFlexiCommand::SUCCESS or MultiFlexiCommand::FAILURE indicating the command outcome. + */ protected function execute(InputInterface $input, OutputInterface $output): int { $format = strtolower($input->getOption('format'));