Category
language
Problem
PHP 8.2+ deprecates creating dynamic properties on classes that do not allow them. #3253 closed VM notices via emitDeprecatedNotice. JIT/AOT property writes on ordinary classes still skip the deprecation path — test/compliance/DynamicPropertyDeprecatedJITTest.php is skipped until MCJIT matches Zend.
Self-host and apps compiled with bin/jit.php / AOT must see the same E_USER_DEPRECATED (respecting error_reporting) as Zend for undeclared writes.
php-src reference
Repro (today)
Use test/compliance/cases/language/dynamic_property_deprecation.phpt:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php test/compliance/cases/language/dynamic_property_deprecation.phpt
# JIT (currently skipped in DynamicPropertyDeprecatedJITTest):
php bin/jit.php test/compliance/cases/language/dynamic_property_deprecation.phpt
'
| Runtime |
Class C undeclared $y |
| Zend / VM |
PHP Deprecated: Creation of dynamic property C::$y then 2 |
| JIT |
deprecation missing or test skipped |
Scope (this repo)
| Module |
Path |
| JIT property set |
lib/JIT.php, lib/JIT/Builtin/Type/Object_.php |
| Deprecation helper |
reuse VM message formatting / Compiler\DeprecatedMetadata |
| Tests |
test/compliance/DynamicPropertyDeprecatedJITTest.php — unskip when green |
Done when
Category
languageProblem
PHP 8.2+ deprecates creating dynamic properties on classes that do not allow them. #3253 closed VM notices via
emitDeprecatedNotice. JIT/AOT property writes on ordinary classes still skip the deprecation path —test/compliance/DynamicPropertyDeprecatedJITTest.phpis skipped until MCJIT matches Zend.Self-host and apps compiled with
bin/jit.php/ AOT must see the sameE_USER_DEPRECATED(respectingerror_reporting) as Zend for undeclared writes.php-src reference
Zend/zend_object_handlers.c—zend_declare_property_error, dynamic property deprecationZend/zend_API.c—zend_error(E_DEPRECATED, ...)Repro (today)
Use
test/compliance/cases/language/dynamic_property_deprecation.phpt:Cundeclared$yPHP Deprecated: Creation of dynamic property C::$ythen2Scope (this repo)
lib/JIT.php,lib/JIT/Builtin/Type/Object_.phpCompiler\DeprecatedMetadatatest/compliance/DynamicPropertyDeprecatedJITTest.php— unskip when greenDone when
dynamic_property_deprecation.phptpasses MCJIT execute (EXPECTF deprecation line + values)#[\AllowDynamicProperties]branch still silent (Stdlib: gc_mem_caches() — missing GC cache flush (PHP 8.3, Zend/zend_gc.c) #5109 / Language: #[\AllowDynamicProperties] — permit undeclared writes (Zend zend_attributes.c parity) #3467)error_reporting(0)suppresses notice like Zend on JIT path