Apache NetBeans version
Apache NetBeans 24
What happened
Current behavior
A private constant property gets marked as unused although used in class attributes:

Expected behavior

Related
Other related functionality executed on this class constant like
- Find usage
- Go to Deklaration
- Refactor->Rename
works as expected and handles its usage inside the attribute without a problem.
Language / Project Type / NetBeans Component
PHP
How to reproduce
<?php
namespace FooBar;
use Attribute;
#[Attribute(Attribute::TARGET_CLASS)]
class SomeAttribute
{
public function __construct(string $name) {}
}
#[SomeAttribute(name: self::NAME)]
class Test
{
private const string NAME = 'foobar';
}
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
jdk-23.0.2
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
Apache NetBeans version
Apache NetBeans 24
What happened
Current behavior
A private constant property gets marked as unused although used in class attributes:
Expected behavior
Related
Other related functionality executed on this class constant like
works as expected and handles its usage inside the attribute without a problem.
Language / Project Type / NetBeans Component
PHP
How to reproduce
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
jdk-23.0.2
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No