[PHP] Duplicate, invalid, or missing value of backed enum must produce error
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 16
### What happened
Duplicate, invalid, and missing enum value must produce error
### How to reproduce
```php
$a*2; // this statement must display error
case Case15 = $var1 > 100; // this statement must display error
case Case16 = $var1 > 100 ? "foo" : "bar"; // this statement must display error
case Case17 = $var1 ?? "foo"; // this statement must display error
case Case18 = match ($var1) { // this statement must display error
10 => "foo",
20 => "bar",
30 => "baz",
};
}
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10
### JDK
Java: 14.0.1; Java HotSpot(TM) 64-Bit Server VM 14.0.1+7 Runtime: Java(TM) SE Runtime Environment 14.0.1+7
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
Contributor guide
Research direction
Start by running the PHP enum example from the issue in Apache NetBeans 16 and inspect the PHP editor's diagnostics for each enum case. Confirm that duplicate, missing, and invalid backed-enum values are reported as errors while the marked valid cases remain accepted; no source files or tests are identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100