Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #33295 [OptionsResolver] Display full nested option hierarchy…
… in exceptions (fancyweb) This PR was merged into the 4.4 branch. Discussion ---------- [OptionsResolver] Display full nested option hierarchy in exceptions | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - It kind of improve the DX, especially when you define a lot of nested form options since the file and line cannot be displayed. ```php $resolver->setDefaults([ 'array' => function (OptionsResolver $arrayResolver): void { $arrayResolver->setRequired('foo'); }, ]); ``` Before: `The required option "foo" is missing.` After: `The required option "array[foo]" is missing.` That can go to 4.3 I guess. Commits ------- a981fc3 [OptionsResolver] Display full nested options hierarchy in exceptions
- Loading branch information
Showing
2 changed files
with
41 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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