-
|
I'm looking into resolving phpstan/phpstan-doctrine#231 in a way by checking the instance of the annotation/attribute so it doesn't matter if a user uses 1) PHPdoc's use Gedmo\Mapping\Annotation as Gedmo;
class X
{
/**
* @Gedmo\Locale
*/
private $locale; // Property is written by gemdo listeners
}But I'm unable to get the referencing class of the annotation to actually do an instanceof check to see if it's an gemdo annotation. I can parse the phpdoc into nodes but I'm stuck there $phpdocNodes = $this->phpDocStringResolver->resolve($property->getDocComment());2) Attributes When using attributes I'm already stuck when trying to retrieve the defined property attributes. The use Gedmo\Mapping\Annotation as Gedmo;
class X
{
#[Gedmo\Locale]
private $locale; // Property is written by gemdo listeners
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
See on how I resolved this in phpstan/phpstan-doctrine#361 |
Beta Was this translation helpful? Give feedback.
See on how I resolved this in phpstan/phpstan-doctrine#361