netbeans
netbeans copied to clipboard
[PHP] Inheriting docs is broken
Apache NetBeans version
Apache NetBeans 15
What happened
NetBeans doesn't inherit docs for class properties, see example below.
How to reproduce
<?php
/**
* This works fine
*/
class Foo
{
/**
* This thing is broken
*/
public $bar;
/**
* This also works fine
*/
public function foobar() {}
}
class Bar extends Foo
{
public $bar = 'bar';
public function foobar() {}
}
/**
* {@inheritDoc}
*/
class FooBar extends Foo
{
/**
* {@inheritDoc}
*/
public $bar = 'bar';
/**
* {@inheritDoc}
*/
public function foobar() {}
}
/**
* {@inheritDoc} trying to extend docs
* won't work!
*/
class FooBarFoo extends Foo
{
/**
* {@inheritDoc} this is just ridiculous
*/
public $bar = 'bar';
/**
* {@inheritDoc} sadly this is also broken
*/
public function foobar() {}
}
$foo = new Foo; // IDE hint: This works fine
$foo->bar; // IDE hint: This thing is broken
$foo->foobar(); // IDE hint: This is ridiculous
$bar = new Bar; // IDE hint: This works fine
$bar->bar; // IDE hint:
$bar->foobar(); // IDE hint: This also works fine
$foobar = new FooBar; // IDE hint: This works fine
$foobar->bar; // IDE hint: {@inheritDoc}
$foobar->foobar; // IDE hint: This also works fine
$foobarfoo = new FooBarFoo; // IDE hint: {@inheritDoc} trying to extend docs won't work!
$foobarfoo->bar; // IDE hint: {@inheritDoc} this is just ridiculous
$foobarfoo->foobar; // IDE hint: {@inheritDoc} sadly this is also broken
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 11 Pro 22000.978
JDK
OpenJDK 19.0.0 (from Chocolatey)
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
https://pear.php.net/package/PhpDocumentor/docs/latest/phpDocumentor/tutorial_tags.inlineinheritdoc.pkg.html
Are you willing to submit a pull request?
No
Code of Conduct
Yes