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

[VarExporter] unserialize() might throw an Exception on php 8#38101

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

@derrabus
Copy link
Member

@derrabusderrabus commentedSep 7, 2020
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets#36872
LicenseMIT
Doc PRN/A

VarExporter attempts a deserialization in order to check if a given object can be exported in serialized form. On php 8, theunserialize call might throw an exception that needs to be caught and converted to the expectedNotInstantiableTypeException.

@nicolas-grekas
Copy link
Member

Do you have an exemple of that on php 8? Worth a test case?

@derrabus
Copy link
MemberAuthor

We have a failing test already, seehttps://travis-ci.org/github/symfony/symfony/jobs/724971294, line 5020.

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedSep 7, 2020
edited
Loading

I'd prefer being very specific about the reason of the exception. Maybe using getFilename()?

derrabus reacted with thumbs up emoji

@derrabusderrabusforce-pushed thebugfix/unserialize-throws branch froma75896d tod9802daCompareSeptember 7, 2020 21:08
@derrabus
Copy link
MemberAuthor

Sounds like a good idea. I've added a check.

@derrabusderrabusforce-pushed thebugfix/unserialize-throws branch fromd9802da to65112e1CompareSeptember 7, 2020 21:10
@chalasrchalasr modified the milestones:3.4,4.4Sep 7, 2020
@nicolas-grekas
Copy link
Member

Thank you@derrabus.

@nicolas-grekasnicolas-grekas merged commitf8fddf3 intosymfony:4.4Sep 8, 2020
@derrabusderrabus deleted the bugfix/unserialize-throws branchSeptember 8, 2020 07:44
This was referencedSep 27, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

@derrabus@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp