php-src/ext/xml
Nikita Popov 653e4ea1c5 Add flag to forbid dynamic property creation on internal classes
While performing resource -> object migrations, we're adding
defensive classes that are final, non-serializable and non-clonable
(unless they are, of course). This path adds a ZEND_ACC_NO_DYNAMIC_PROPERTIES
flag, that also forbids the creation of dynamic properties on these objects.
This is a subset of #3931 and targeted at internal usage only
(though may be extended to userland at some point in the future).

It's already possible to achieve this (what the removed
WeakRef/WeakMap code does), but there's some caveats: First, this
simple approach is only possible if the class has no declared
properties, otherwise it's necessary to special-case those
properties. Second, it's easy to make it overly strict, e.g. by
forbidding isset($obj->prop) as well. And finally, it requires a
lot of boilerplate code for each class.

Closes GH-5572.
2020-06-24 11:52:36 +02:00
..
tests Trim trailing whitespaces and fix code style 2020-05-12 17:00:11 +02:00
compat.c Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00
config.m4 Use a common setup macro to detect the Expat library 2019-06-04 10:10:50 +02:00
config.w32 Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
CREDITS
expat_compat.h Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00
php_xml.h Remove mention of PHP major version in Copyright headers 2019-09-25 14:51:43 +02:00
xml.c Add flag to forbid dynamic property creation on internal classes 2020-06-24 11:52:36 +02:00
xml.stub.php Fix UNKNOWN default values in ext/xml 2020-05-06 19:15:39 +02:00
xml_arginfo.h Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00