idea-php-annotation-plugin icon indicating copy to clipboard operation
idea-php-annotation-plugin copied to clipboard

When a const is used in an annotation it cannot be found via "find usages"

Open pkly opened this issue 5 years ago • 1 comments

The following code doesn't show any usages.

// assume there's an annotation called Foo with a public field called "fields"

// file StatusEnum.php
class StatusEnum
{
    public const ACCEPTED = 1; // shows nothing on ctrl+click or find usages
}

// file MyClass.php

use StatusEnum;

/**
  * @Foo(fields={"status"={StatusEnum::ACCEPTED}})
  */
class MyClass 
{
}

It clearly should show usage.

pkly avatar Sep 14 '20 09:09 pkly

This would be quite a useful feature. The reverse works (i.e. if you ctrl+click on the usage, it takes you to the definition).

ollielowson-wcbs avatar Jan 14 '22 11:01 ollielowson-wcbs