[Cache] igbinary_serialize
is not compatible with serialize
anymore
#52391
Labels
igbinary_serialize
is not compatible with serialize
anymore
#52391
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'sigbinary_serialize
, there is a ticket to change this though.Symfony Cache
DefaultMarshaller
still treatsigbinary_serialize
as a drop-in replacement forserialize
but this is no longer true. Trying to serialize entities with igbinary installed now results in the same error we used to get withserialize
.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
The text was updated successfully, but these errors were encountered: