netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

"Find usages" on a PHP class constructor does not find uses of alias classes

Open dezlov opened this issue 3 years ago • 1 comments

Apache NetBeans version

Apache NetBeans 14

What happened

"Find usages" on a PHP class constructor does not find uses of alias classes.

For example, is we have use Bar as Foo, finding uses of Bar constructor will find new Bar() but not new Foo().

How to reproduce

use Bar as Foo;

class Bar
{
	public function __construct()
	{
	}
}

$foo = new Foo();
$bar = new Bar();

var_dump($foo);
var_dump($bar);

Try to find usages of __construct().

The results show only 2 usages found on these lines:

  • public function __construct()
  • $bar = new Bar();

The usage on this line is not shown in the results:

  • $foo = new Foo();

Did this work correctly in an earlier version?

No

Operating System

Windows 10 64-bit

JDK

OpenJDK 11.0.15 64-bit

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

dezlov avatar Jul 15 '22 09:07 dezlov

Bug is reproducible. Thanks for your report.

KacerCZ avatar Jul 16 '22 09:07 KacerCZ

@junichi11 I noticed that you do a lot of work on the PHP side for NetBeans. I was wondering if you could have a look at this issue?

dezlov avatar Feb 18 '23 06:02 dezlov

@dezlov I'll try to have a look at it later but I can't promise anything.

junichi11 avatar Feb 18 '23 23:02 junichi11