Repository navigation
fix #89 Resolve the ui.default option with a normalizer (nested options removed in Symfony 8) - #90
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #89.
ProcessConfigurationsManagerresolves theui.defaultoption with a normalizer and its ownOptionsResolver(as already done forui), instead of nested options defined withsetDefault()(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:
inputdefaults tonull,contextto[], eachcontextitem must be an array with the requiredkeyandvalue, unknown options are rejected.Tests:
ProcessConfigurationsManagerTest:defaultresolved to{input: null, context: []}when not configured,defaultwithoutcontext, invalid values (not an array, unknown option,contextnot an array, item not an array, item withoutvalue, item with an unknown option)tests/App/config/packages.yaml: thedefaultworkaround oftest.uploadis removed, soLaunchActionTest::testLaunchWithFileUploadcovers a launch form withoutui.default(also asserts that no context row is displayed)Checked:
Requirements
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