php-src/ext/sysvsem
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 Convert resource to object in Sysvshm extension 2020-06-16 16:36:11 +02:00
config.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
CREDITS
php_sysvsem.h Fix [-Wundef] warning in Sysvsem extension 2020-05-18 00:37:17 +02:00
sysvsem.c Add flag to forbid dynamic property creation on internal classes 2020-06-24 11:52:36 +02:00
sysvsem.stub.php Rename the recently introduced Sysvsem class to SysvSemaphore 2020-05-07 10:21:58 +02:00
sysvsem_arginfo.h Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00