php-src/ext/enchant
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 enchant resources to opaque objects 2020-05-29 14:51:41 +02:00
config.m4 Use libenchant-2 when available 2020-05-04 08:27:31 +02:00
config.w32 Use libenchant2 if available on Windows 2020-05-04 11:27:00 +02:00
CREDITS Revert "add myself as enchant maintainer" 2020-05-13 15:56:10 +02:00
enchant.c Add flag to forbid dynamic property creation on internal classes 2020-06-24 11:52:36 +02:00
enchant.stub.php Remove outdated PHPDoc from ext/enchant's stub 2020-06-23 22:35:27 +02:00
enchant_arginfo.h Include stub hash in generated arginfo files 2020-06-24 09:55:19 +02:00
php_enchant.h enchant: bump license version 2020-05-06 13:13:19 +02:00