Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[FrameworkBundle] Enablejson_decode_detailed_errors
in dev by default#51215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
2a551c2
to4939f03
Compare4939f03
tob595e90
CompareThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This works because performNoDeepMerging is not set on the node, OK.
Thank you@ostrolucky. |
@@ -1123,6 +1125,10 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $e | |||
->arrayNode('default_context') | |||
->normalizeKeys(false) | |||
->useAttributeAsKey('name') | |||
->beforeNormalization() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Adding that default inbeforeNormalization
makes it very hard to re-disable the feature because each source will re-enable it in this normalization (well, each source configuring thedefault_context
).
This should be done in thevalidate
phase instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
see#57803
->beforeNormalization() | ||
->ifTrue(fn () => $this->debug && class_exists(JsonParser::class)) | ||
->then(fn (array $v) => $v + [JsonDecode::DETAILED_ERROR_MESSAGES => true]) | ||
->end() | ||
->defaultValue([]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
the default value should probably also includeJsonDecode::DETAILED_ERROR_MESSAGES => true
(when appropriate) so that this configuration also applies when no default_context is configured at all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
see#57804
… to the validate phase (xabbuh)This PR was merged into the 6.4 branch.Discussion----------[FrameworkBundle] move adding detailed JSON error messages to the validate phase| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Issues |Fix#51215 (comment)| License | MITCommits-------b9258df move adding detailed JSON error messages to the validate phase
…fault when debug enabled (xabbuh)This PR was merged into the 7.2 branch.Discussion----------[FrameworkBundle] enable detailed error messages by default when debug enabled| Q | A| ------------- | ---| Branch? | 7.2| Bug fix? | no| New feature? | yes| Deprecations? | no| Issues |Fix#51215 (comment)| License | MITCommits-------0134a67 [FrameworkBundle] enable detailed error messages by default when debug enabled
Uh oh!
There was an error while loading.Please reload this page.
Follows