You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This worked on 8.4 and before, and doesn't anymore on 8.5:
<?php
#[\Attribute(\Attribute::TARGET_CLASS)]
abstractclass Base
{
}
#[\Attribute(\Attribute::TARGET_CLASS)]
class Child extends Base
{
}
#[Child]
class A
{
}
$r = new \ReflectionClass('A');
var_dump($r->getAttributes('Base', ReflectionAttribute::IS_INSTANCEOF));
Resulted in this output:
Fatal error: Cannot apply #[\Attribute] to abstract class Base in /in/isSn6 on line 5