Re: RFC: Deprecate json_encode() on classes marked as non-serializable

From: Date: Thu, 19 Sep 2024 12:19:09 +0000
Subject: Re: RFC: Deprecate json_encode() on classes marked as non-serializable
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-125630@lists.php.net to get a copy of this message
Hi Am 2024-09-05 18:03, schrieb John Coggeshall:
I would suggest we take a step back from this and look at it with a bit more of a wider lens. It seems to me that this would be a good place to have an attribute (e.g. #[NotSerializable] ) that could be defined for any class (with ZEND_ACC_NOT_SERIALIZABLE being automatically given this attribute)? It just seems to be a more holistic approach that makes sense, rather than basing it on internal engine stuff and/or limiting it to internal objects.
FWIW There already is such an RFC: https://wiki.php.net/rfc/not_serializable Discussion thread is here: https://externals.io/message/121969#121969 Best regards Tim Düsterhus

« previous php.internals (#125630) next »