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

[Serializer] Fix exception thrown byYamlEncoder#59323

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
fabpot merged 1 commit intosymfony:6.4fromVincentLanglet:yamlEncoder
Jan 6, 2025

Conversation

VincentLanglet
Copy link
Contributor

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix the example given#59306 (comment)
LicenseMIT

DecoderInterface::decode is supposed to throw scoped exception cf

* @throws UnexpectedValueException
*/
publicfunctiondecode(string$data,string$format,array$context = []):mixed;

but the YamlEncoder::decode could throw ParseException.
Others similar Encoder, like XmlEncoder or JsonEncoder are throwing NotEncodableValue so I did the same cf example

try {
$encodedJson =json_encode($data,$options);
}catch (\JsonException$e) {
thrownewNotEncodableValueException($e->getMessage(),0,$e);
}

@carsonbotcarsonbot added this to the6.4 milestoneDec 29, 2024
@VincentLangletVincentLanglet changed the title[Serializer] Fix a typo in NoPrivateNetworkHttpClient[Serializer] Fix exception thrown by YamlEncoderDec 29, 2024
@VincentLanglet
Copy link
ContributorAuthor

I don't thinkUrlSanitizerTest errors are related...

@OskarStarkOskarStark changed the title[Serializer] Fix exception thrown by YamlEncoder[Serializer] Fix exception thrown byYamlEncoderDec 29, 2024
@fabpot
Copy link
Member

Thank you@VincentLanglet.

@fabpotfabpot merged commitd3583b9 intosymfony:6.4Jan 6, 2025
5 of 11 checks passed
This was referencedJan 29, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

4 participants
@VincentLanglet@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp