Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP] Enum is missing autocompletion "name" item for instance context #5102

Closed
the-liquid-metal opened this issue Dec 13, 2022 · 2 comments
Closed
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)

Comments

@the-liquid-metal
Copy link

Apache NetBeans version

Apache NetBeans 16

What happened

Enum has builtin readonly property: name and value. Unfortunately, name is missing in autocomplete, specifically in instance context.

How to reproduce

<?php
enum Suit: string {
  case Hearts = 'H';
  case Diamonds = 'D';
  case Clubs = 'C';
  case Spades = 'S';
}

echo Suit::Hearts->value . "\n"; // OK
echo Suit::Hearts->name  . "\n"; // MISSING

$card = Suit::Diamonds;
echo $card->value . "\n"; // OK
echo $card->name  . "\n"; // MISSING

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

@the-liquid-metal the-liquid-metal added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Dec 13, 2022
@mbien mbien added the PHP [ci] enable extra PHP tests (php/php.editor) label Dec 13, 2022
@KacerCZ
Copy link
Contributor

KacerCZ commented Jan 15, 2023

Reproducible.
Thanks for your report.

@KacerCZ KacerCZ removed the needs:triage Requires attention from one of the committers label Jan 15, 2023
@KacerCZ
Copy link
Contributor

KacerCZ commented Jan 16, 2023

PR #4966 fixes this issue.

@KacerCZ KacerCZ closed this as completed Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

No branches or pull requests

3 participants