netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

[PHP] function "use" variable linking is broken

Open mvorisek opened this issue 1 year ago • 0 comments

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 avatar May 02 '24 13:05 mvorisek