-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Failed to save key: User Notice: serialize(): \"groups\" returned as member variable from __sleep() but does not exist at #28352
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@yawa20 would you be willing to share your resolution so it can help others in the future? :) |
@sroze but, my resolution was in Marshaller/PhpMarshaller.php original code
fixed code
|
Actually that's a real bug! See #28352 for the fix. |
nicolas-grekas
added a commit
that referenced
this issue
Sep 7, 2018
…() (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [VarExporter] fix exporting objects that mutate on __sleep() | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28352 | License | MIT | Doc PR | - Commits ------- 36e412f [VarExporter] fix exporting objects that mutate on __sleep()
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.2.0-DEV
Description
on entity caching get`s an error:
How to reproduce
add validation assertions to doctrine entity field without "groups" property, then try to build project
it happend because Constraints have lazily field ("groups"), and it does not exists before $value->__sleep() calls.
Possible Solution
in Marshaller::marshall() method call
$value->__sleep() before $arrayValue = (array) $value;
The text was updated successfully, but these errors were encountered: