Skip to content

[PHP] Refactor/Rename fails for PHPDoc @param on variadics #9437

Closed

Description

@rarila

Apache NetBeans version

Apache NetBeans 30

What happened

When renaming a parameter of a function with Refactor->Rename… NetBeans fails to rename the variable in the PHPDoc block

Language / Project Type / NetBeans Component

PHP

How to reproduce

Have some file

class Test
{
    /**
     * @param string ...$param
     */
    public function test(string ...$param): void
    {
    }
}
  • Right-click on $param in methods parameter list
  • select Refactor->Rename…
  • type in "New Name", e.g. "renamed"
  • Press: "Preview"
  • Press: "Do Refactoring"

Result:

class Test
{
    /**
     * @param string ...$param
     */
    public function test(string ...$renamed): void
    {
    }
}

Expected result:

class Test
{
    /**
     * @param string ...$renamed
     */
    public function test(string ...$renamed): void
    {
    }
}

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

Java: 25.0.2; OpenJDK 64-Bit Server VM 25.0.2+10-69

Apache NetBeans packaging

Community provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Activity

  1. added
    kind:bug
    needs:triage
    on Jun 11, 2026
  2. added
    PHP
    on Jun 11, 2026
  3. removed
    needs:triage
    on Jul 5, 2026
  4. added 2 commits that reference this issue on Jul 5, 2026
    6f7fcb5
    0da31db
  5. matthiasblaesing commented on Jul 6, 2026

    @matthiasblaesing
    Contributor

    @rarila please have a look at #9487. That should fix the issue. A nightly build can be downloaded from the checks page or directly: https://github.com/apache/netbeans/suites/77703178779/artifacts/8095045915

  6. added a commit that references this issue on Jul 8, 2026
    8ea4484
  7. rarila commented on Jul 10, 2026

    @rarila
    Author

    @matthiasblaesing

    Finally, I managed to test it. Works great!

    Thank you, very much!

  8. matthiasblaesing commented on Jul 11, 2026

    @matthiasblaesing
    Contributor

    @rarila thanks for taking the time to test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

PHPkind:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions