Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged

Conversation

ostrolucky
Copy link
Contributor

@ostroluckyostrolucky commentedAug 1, 2023
edited by OskarStark
Loading

QA
Branch?6.4
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix#51172 (comment)
LicenseMIT
Doc PR

Follows

@ostroluckyostroluckyforce-pushed theauto-enable-json-detailed-errors branch 4 times, most recently from2a551c2 to4939f03CompareAugust 2, 2023 10:23
@ostroluckyostroluckyforce-pushed theauto-enable-json-detailed-errors branch from4939f03 tob595e90CompareAugust 2, 2023 10:32
Copy link
Member

@nicolas-grekasnicolas-grekas left a 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.

@fabpot
Copy link
Member

Thank you@ostrolucky.

@fabpotfabpot merged commit08b93ad intosymfony:6.4Aug 3, 2023
This was referencedOct 21, 2023
@@ -1123,6 +1125,10 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $e
->arrayNode('default_context')
->normalizeKeys(false)
->useAttributeAsKey('name')
->beforeNormalization()
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

->beforeNormalization()
->ifTrue(fn () => $this->debug && class_exists(JsonParser::class))
->then(fn (array $v) => $v + [JsonDecode::DETAILED_ERROR_MESSAGES => true])
->end()
->defaultValue([])
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

nicolas-grekas added a commit that referenced this pull requestJul 26, 2024
… 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
nicolas-grekas added a commit that referenced this pull requestAug 13, 2024
…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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@stofstofstof left review comments

@OskarStarkOskarStarkOskarStark left review comments

@derrabusderrabusderrabus left review comments

@xabbuhxabbuhxabbuh left review comments

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

8 participants
@ostrolucky@fabpot@nicolas-grekas@stof@OskarStark@derrabus@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp