Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pkly opened this issue Sep 14, 2020 · 1 comment
Open

Comments

@pkly
Copy link

pkly commented Sep 14, 2020

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.

@ollielowson-wcbs
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants