Tags: symfony/polyfill-deepclone
Tags
[DeepClone] Drop SPL "\0" special key from deepclone_hydrate() Mirrors the C extension change (symfony/php-ext-deepclone#17). ArrayObject, ArrayIterator and SplObjectStorage all ship __serialize / __unserialize since PHP 7.4 — callers populate them the standard way: $ao = deepclone_hydrate('ArrayObject'); $ao->__unserialize([ArrayObject::ARRAY_AS_PROPS, ['x' => 1], []]); The mangled-key resolution path is unchanged; only the SPL fast-path is removed. Symfony's Hydrator/Instantiator retain BC by translating the legacy "\0" shape to __unserialize() themselves.
[DeepClone] Collapse $scoped_vars + $mangled_vars into a single $vars… … param Adds DEEPCLONE_HYDRATE_MANGLED_VARS flag. $vars is scoped per-class by default; pass the flag to interpret it as the flat mangled-key array (array) $obj produces. Footgun guard: NUL-prefixed key in scoped mode raises ValueError pointing at the missing flag.