msgpack-php icon indicating copy to clipboard operation
msgpack-php copied to clipboard

PHP 8.2: msgpack_unpack: Support deprecation of dynamic properties, forbid dynamic properties in `readonly` classes

Open TysonAndre opened this issue 3 years ago • 1 comments

https://github.com/php/php-src/issues/9325

  • https://wiki.php.net/rfc/readonly_classes - Cannot create dynamic property errors should probably be thrown in msgpack_unpack() to avoid creating readonly class instances with dynamic properties
  • https://wiki.php.net/rfc/deprecate_dynamic_properties - msgpack_unpack() should probably emit a deprecation notice for classes without #[AllowDynamicProperties] attributes, because in php 9.0, msgpack_unpack() on the same data would become a Error

The approach that would be used for php 8.2 unserialize() is still being discussed, but filing this to report work that would be needed to support php 8.2.

TysonAndre avatar Aug 13 '22 12:08 TysonAndre

Has there been an outcome/consensus?

m6w6 avatar Oct 07 '22 08:10 m6w6