Why
This combines multiple surfaces that already work individually but are riskier together:
- static autoload discovery
class_exists() / literal class loading
- case-insensitive class lookup
ReflectionClass construction from a differently-cased name
- attribute metadata lookup on the autoloaded class
This is a good candidate for catching resolver/name-resolution drift or reflection/autoload mismatches.
Proposed stress program
<?php
spl_autoload_register(function ($name) {
if ($name === "Demo\\Thing") {
require __DIR__ . "/DemoThing.php";
}
});
if (class_exists("demo\\thing")) {
$r = new ReflectionClass("DEMO\\THING");
$attrs = $r->getAttributes();
echo $r->getName() . "\n";
echo count($attrs) . "\n";
echo $attrs[0]->getName() . "\n";
}
What to verify
- Autoload is triggered consistently from the literal class probe.
- Canonical class identity survives case folding.
- Reflection sees the same declaration that autoload resolved.
- Attribute lookup matches the resolved class name and preserves PHP-visible behavior.
Scope
Track as stress coverage first; no confirmed bug yet.
Why
This combines multiple surfaces that already work individually but are riskier together:
class_exists()/ literal class loadingReflectionClassconstruction from a differently-cased nameThis is a good candidate for catching resolver/name-resolution drift or reflection/autoload mismatches.
Proposed stress program
What to verify
Scope
Track as stress coverage first; no confirmed bug yet.