-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
5.x, 6.x
Description
As of PHP 7.4.6 (doctrine/common#886 (comment)), PHP's serialize
function ignores uninitialized properties and no longer triggers an error. The same change was not (yet) made in igbinary's igbinary_serialize
, there is a ticket to change this though.
Symfony Cache DefaultMarshaller
still treats igbinary_serialize
as a drop-in replacement for serialize
but this is no longer true. Trying to serialize entities with igbinary installed now results in the same error we used to get with serialize
.
Typed property Proxies_CG_\App\Entity\EntityName::$ must not be accessed before initialization (in __sleep)
How to reproduce
Serialize an object with an uninitialised property through Symfony cache with the default marshaller config.
Possible Solution
It is possible to disable igbinary through the cache.default_marshaller
service but Symfony may want to consider disabling it by default as it no longer is a drop-in replacement.
Additional Context
No response