Category
language (umbrella — split work across linked issues)
Status (2026-06-03 audit)
Partial landing. Attributes parse/compile on classes/methods/properties; VM reflection read paths exist for some targets. Remaining gaps are tracked as child issues — do not implement the full umbrella in one PR.
| Gap |
Issue |
Builtin Attribute class + class_exists('Attribute') |
#5142 |
#[\DelayedTargetValidation] (PHP 8.4) |
#5124 |
#[AllowDynamicProperties] on parameter → compile error |
#5137 |
ReflectionProperty property attrs/types |
#4384 |
Built-in #[\SensitiveParameter] on ReflectionParameter::getAttributes() |
#5152 |
ReflectionAttribute::newInstance() |
#3206 (closed — reopen if regressed) |
| JIT/AOT attribute metadata tables |
#2467 (closed — verify native binaries) |
Problem
Frameworks need end-to-end attribute parity: parse, store metadata, reflect, and (PHP 8.4+) validate targets. This umbrella coordinates child issues toward Zend behavior.
php-src reference
Repro (integration — pick a failing child)
<?php
#[Attribute]
class DemoAttr {
public function __construct(public string $x) {}
}
#[DemoAttr('ok')]
function f(#[DemoAttr('p')] int $a) {}
echo (int) class_exists('Attribute'), "\n";
$r = new ReflectionFunction('f');
echo count($r->getAttributes()), "\n";
$paramAttrs = $r->getParameters()[0]->getAttributes();
echo count($paramAttrs), "\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php repro.php
php bin/vm.php repro.php
'
| Check |
Zend |
vm.php (typical today) |
class_exists('Attribute') |
1 |
0 → #5142 |
function getAttributes() count |
1 |
may work |
parameter getAttributes() count |
1 |
may work |
Scope (umbrella — do not duplicate child PRs)
Done when (umbrella closes)
North star
#1492 self-host — attribute metadata must survive in native binaries without Zend.
Worker guidance
Claim a child issue, not this umbrella, unless coordinating metadata schema shared by multiple targets.
Category
language(umbrella — split work across linked issues)Status (2026-06-03 audit)
Partial landing. Attributes parse/compile on classes/methods/properties; VM reflection read paths exist for some targets. Remaining gaps are tracked as child issues — do not implement the full umbrella in one PR.
Attributeclass +class_exists('Attribute')#[\DelayedTargetValidation](PHP 8.4)#[AllowDynamicProperties]on parameter → compile errorReflectionPropertyproperty attrs/types#[\SensitiveParameter]onReflectionParameter::getAttributes()ReflectionAttribute::newInstance()Problem
Frameworks need end-to-end attribute parity: parse, store metadata, reflect, and (PHP 8.4+) validate targets. This umbrella coordinates child issues toward Zend behavior.
php-src reference
Zend/zend_compile.c— attribute groups on declarationsZend/zend_attributes.c— storage, validation,zend_register_attribute_ceext/reflection/php_reflection.c—ReflectionAttribute,getAttributes()Repro (integration — pick a failing child)
class_exists('Attribute')10→ #5142getAttributes()count1getAttributes()count1Scope (umbrella — do not duplicate child PRs)
lib/Compiler.php— attribute metadata attachmentlib/VM/BuiltinClasses.php— internal attribute classeslib/VM/Reflection*.php— read pathslib/JIT.php/lib/AOT/— native metadata (Language: PHP 8 attributes reflection JIT/AOT (phase 2, post-#1354 VM) #2467 area)Done when (umbrella closes)
php script/capability-syntax.phpdocuments JIT/AOT attribute reflection stateNorth star
#1492 self-host — attribute metadata must survive in native binaries without Zend.
Worker guidance
Claim a child issue, not this umbrella, unless coordinating metadata schema shared by multiple targets.