vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Refactor rename symbol of variable will impact named parameter

Open momala454 opened this issue 2 years ago • 0 comments

Describe the bug Refactoring a variable will also rename the named parameter

To Reproduce

function helloWorld(int $myParameter): bool {
    return true;
}

$myParameter = 'hello';

$result = helloWorld(
    myParameter: 6
);

Renaming the variable $myParameter to $myParameter2 will also change the call to the helloWorld function like this

$result = helloWorld(
    myParameter2: 6
);

Take note that the named parameter itself in the function declaration is not changed

Expected behavior Only the variable should be renamed

Screenshots If applicable, add screenshots to help explain your problem.

Platform and version windows 10 intelephense 1.8.2

momala454 avatar Aug 22 '22 12:08 momala454