Skip to content

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

@pkly

Description

@pkly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions