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: A typed class field marked as deprecated is displayed as not deprecated #6310

Closed
troizet opened this issue Aug 7, 2023 · 1 comment · Fixed by #6321
Closed

PHP: A typed class field marked as deprecated is displayed as not deprecated #6310

troizet opened this issue Aug 7, 2023 · 1 comment · Fixed by #6321
Assignees
Labels
kind:bug Bug report or fix PHP [ci] enable extra PHP tests (php/php.editor)
Milestone

Comments

@troizet
Copy link
Collaborator

troizet commented Aug 7, 2023

Apache NetBeans version

Apache NetBeans 18

What happened

A typed class field marked as deprecated is displayed as not deprecated.

Displaying a field in the navigator:
deprecated_field

Displaying a field in an autocomplete:
deprecated_field_3

Displaying a field in the editor when "Resolve Deprecated Elements" is checked:
deprecated_field_2

How to reproduce

  • create a TestClass.php file with the TestClass class:
<?php

class TestClass {

   /** @deprecated */
   public $di1;

   /** @deprecated */
   public int $di2;

   /**
    * @deprecated
    * @var int
    */
   public $di3;

   /**
    * @deprecated
    * @var int
    */
   public int $di4;

}

Did this work correctly in an earlier version?

No / Don't know

Operating System

Debian GNU/Linux 12 (bookworm)

JDK

OpenJDK Runtime Environment 17.0.7+7-Debian-1deb12u1

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

@troizet troizet added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Aug 7, 2023
@junichi11 junichi11 added PHP [ci] enable extra PHP tests (php/php.editor) and removed needs:triage Requires attention from one of the committers labels Aug 7, 2023
@junichi11
Copy link
Member

Reproducible. Thank you for reporting it.

@junichi11 junichi11 self-assigned this Aug 7, 2023
@junichi11 junichi11 added this to the NB20 milestone Aug 7, 2023
junichi11 added a commit to junichi11/netbeans that referenced this issue Aug 9, 2023
…yed as deprecated apache#6310

- apache#6310
- Fix the `NodeRangeLocator`'s end offset when the node is the `SingleFieldDeclaration` because a start offset is the start offset of not a type but a variable name
- Add unit tests
junichi11 added a commit to junichi11/netbeans that referenced this issue Aug 9, 2023
…yed as deprecated apache#6310

- apache#6310
- Fix the `NodeRangeLocator`'s end offset when the node is the `SingleFieldDeclaration` because a start offset is the start offset of not a type but a variable name
- Add unit tests
junichi11 added a commit that referenced this issue Aug 30, 2023
…fields

Fix the problem that typed fields marked as deprecated are not displayed as deprecated #6310
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
2 participants