Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
e4b92eb toa75896dComparenicolas-grekas commentedSep 7, 2020
Do you have an exemple of that on php 8? Worth a test case? |
derrabus commentedSep 7, 2020
We have a failing test already, seehttps://travis-ci.org/github/symfony/symfony/jobs/724971294, line 5020. |
nicolas-grekas commentedSep 7, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'd prefer being very specific about the reason of the exception. Maybe using getFilename()? |
a75896d tod9802daComparederrabus commentedSep 7, 2020
Sounds like a good idea. I've added a check. |
d9802da to65112e1Comparenicolas-grekas commentedSep 8, 2020
Thank you@derrabus. |
Uh oh!
There was an error while loading.Please reload this page.
VarExporter attempts a deserialization in order to check if a given object can be exported in serialized form. On php 8, the
unserializecall might throw an exception that needs to be caught and converted to the expectedNotInstantiableTypeException.