Skip to content

fix #89 Resolve the ui.default option with a normalizer (nested options removed in Symfony 8) - #90

Merged
njoubert-cleverage merged 1 commit into
mainfrom
89
Oct 5, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
89

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #89.

ProcessConfigurationsManager resolves the ui.default option with a normalizer and its own OptionsResolver (as already done for ui), instead of nested options defined with setDefault() (deprecated since symfony/options-resolver 7.3, removed in 8.0). A single code path for Symfony 6.4, 7.4 and 8: setOptions() does not exist before 7.3.

The rules are unchanged: input defaults to null, context to [], each context item must be an array with the required key and value, unknown options are rejected.

Tests:

  • ProcessConfigurationsManagerTest: default resolved to {input: null, context: []} when not configured, default without context, invalid values (not an array, unknown option, context not an array, item not an array, item without value, item with an unknown option)
  • tests/App/config/packages.yaml: the default workaround of test.upload is removed, so LaunchActionTest::testLaunchWithFileUpload covers a launch form without ui.default (also asserts that no context row is displayed)

Checked:

  • bundle (Symfony 8.1, PHP 8.5): 329 tests OK; without the fix, 9 of them fail (including the functional test, 500). PHPStan, PHP-CS-Fixer, Rector OK
  • process-bundle-demo (Symfony 7.4): the 4 launch forms are displayed with their default values, and the "Defining nested options" deprecation is gone

Requirements

  • Documentation updates
    • Reference
    • Changelog
  • Unit tests

Breaking changes

None: the Symfony 7.x behaviour is restored with Symfony 8 (only the wording of the validation error messages changes).

🤖 Generated with Claude Code

…sted options removed in Symfony 8

Nested options defined with setDefault() are deprecated since symfony/options-resolver 7.3 and removed in 8.0: the
closure itself was returned, so the launch form of a process without ui.default failed (Cannot use object of type
Closure as array) and ui.default was no longer validated. setOptions() does not exist before 7.3: a normalizer works
with Symfony 6.4, 7.4 and 8.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage njoubert-cleverage added the bug Something isn't working label Oct 5, 2026
@njoubert-cleverage
njoubert-cleverage merged commit 9471168 into main Oct 5, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Launch form fails with Symfony 8 when a process has no ui.default option (nested options removed from OptionsResolver)

1 participant