Skip to content

Fix run-template:get crash on missing fields option resolution#50

Merged
Vitexus merged 2 commits into
mainfrom
copilot/fix-run-template-get-error
Jul 16, 2026
Merged

Fix run-template:get crash on missing fields option resolution#50
Vitexus merged 2 commits into
mainfrom
copilot/fix-run-template-get-error

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

run-template:get could fail with an internal Symfony option error (The "fields" option does not exist.), including with --format=json, even when the run template record existed. This made single-record inspection unreliable and forced users to fall back to run-template:list + client-side filtering.

  • Command runtime hardening (run-template:get)

    • Guarded fields access with hasOption('fields') before calling getOption('fields').
    • Prevents command execution from crashing if option resolution differs across runtime/package contexts.
  • Regression coverage (RunTemplateTest)

    • Added an explicit assertion that run-template:get defines the --fields option, so option-definition regressions are caught early.
$fields = $input->hasOption('fields') ? $input->getOption('fields') : null;

Copilot AI changed the title [WIP] Fix internal error in run-template:get command Fix run-template:get crash on missing fields option resolution Jul 16, 2026
Copilot AI requested a review from Vitexus July 16, 2026 08:18
@Vitexus
Vitexus marked this pull request as ready for review July 16, 2026 13:24
@Vitexus
Vitexus merged commit b00afc3 into main Jul 16, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run-template:get fails with "The 'fields' option does not exist"

2 participants