Bug #76737 [Ver->Csd]: Unserialized reflection objects are broken, but they shouldn't be serializable

From: Date: Sat, 29 Sep 2018 12:48:36 +0000
Subject: Bug #76737 [Ver->Csd]: Unserialized reflection objects are broken, but they shouldn't be serializable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217282@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76737&edit=1 ID: 76737 Updated by: nikic@php.net Reported by: nicolas dot grekas+php at gmail dot com Summary: Unserialized reflection objects are broken, but they shouldn't be serializable -Status: Verified +Status: Closed Type: Bug Package: Reflection related PHP Version: 7.1Git-2018-08-13 (Git) Block user comment: N Private report: N New Comment: Automatic comment on behalf of nikita.ppv@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=96da1fe8a906da8d2927f57ff94ed25a8e6ea411 Log: Fixed bug #76737 Previous Comments: ------------------------------------------------------------------------ [2018-08-20 13:59:10] nicolas dot grekas+php at gmail dot com Note that IteratorIterator and RecursiveIteratorIterator also shouldn't be serializable. (and by the way, they're missing a private __clone method, same for ReflectionGenerator) ------------------------------------------------------------------------ [2018-08-14 13:25:15] cmb@php.net See also the related FR #62919. ------------------------------------------------------------------------ [2018-08-13 14:13:44] nicolas dot grekas+php at gmail dot com Description: ------------ When serializing any Reflector instance, but also ReflectionType and ReflectionGenerator (which are the only two classes of the reflection extension not implementing Reflector BTW), then the unserialized value is unusable and throws Error: "Internal error: Failed to retrieve the reflection object" on any method calls. This is legit, but instead of this late error, these should not be serializable in the first place. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76737&edit=1

« previous php.bugs (#217282) next »