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] function "use" variable linking is broken #7348

Open
mvorisek opened this issue May 2, 2024 · 0 comments
Open

[PHP] function "use" variable linking is broken #7348

mvorisek opened this issue May 2, 2024 · 0 comments
Labels
kind:bug Bug report or fix needs:triage Requires attention from one of the committers PHP [ci] enable extra PHP tests (php/php.editor)

Comments

@mvorisek
Copy link

mvorisek commented May 2, 2024

Apache NetBeans version

Apache NetBeans 21

What happened

image

Notice the $fx(); line is not highlighted when other $fx variable usages are.

image

It seems it is otherwise supported, but the $otherFx = function () {}; line is breaking it.

As a consequence of this bug, $fx cannot be refactored/renamed using IDE in one step.

Language / Project Type / NetBeans Component

PHP

How to reproduce

<?php

function test() {
    $fx = function () {};

    $callFx = function () use ($fx) {
        $otherFx = function () {};
        $fx();
        $otherFx();
    };
}

Did this work correctly in an earlier version?

No / Don't know

Operating System

any

JDK

any

Apache NetBeans packaging

Apache NetBeans provided installer

Are you willing to submit a pull request?

No

@mvorisek mvorisek added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels May 2, 2024
@troizet troizet added the PHP [ci] enable extra PHP tests (php/php.editor) label May 2, 2024
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 needs:triage Requires attention from one of the committers PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

No branches or pull requests

2 participants