[PHP] Enum must display error if the case does not exist
- 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
Enum must display error if the case does not exist
### How to reproduce
```php
name ."\n"; // this statement must display error
echo Suit::Xxx->value ."\n"; // this statement must display error
$card = Suit::Xxx; // this statement must display error
echo $card->name ."\n"; // OK
echo $card->value ."\n"; // OK
```
### 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 reproducing the PHP enum example in Apache NetBeans 16 and inspect the PHP editor's diagnostics for unresolved enum cases. The fix is complete when the three Xxx references display errors while the subsequent $card name and value accesses remain accepted.
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
- 42/100