apache / apache/netbeans

[PHP] Inconsistency of displayed error on instantiation in class constant declaration

Open
#6,021 0 comments 0 reactions 0 assignees View on GitHub
kind:feature needs:triage PHP
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 18

### What happened

In general, Netbeans can detect various error on class constant declaration. There are several errors related to instantiation, which can confuse people.

### How to reproduce

```php

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported diagnostics in the PHP editor with the class-constant examples from the issue, comparing standalone instantiations with array members and the Test1–Test5 cases. Done means each invalid instantiation receives the expected error independently, including cases after another erroneous declaration.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.