-
-
Notifications
You must be signed in to change notification settings - Fork 640
Description
In PHP, private constants, properties and methods are not inherited by child classes, yet in phpDocumentor, when a class extends another class, the child-class documentation lists private constants, properties and methods of the parent as also being private constants, properties and methods of the child.
Expected behavior
Public and protected constants, properties and methods of the parent class should also be listed in the documentation of the child class, but not those which are private in the parent class.
Actual behavior
The documentation of the child class shows all constants, properties and methods of the parent class, regardless of their visibility.
Steps to reproduce the problem
- Create a class with a private constant, a private property and a private method.
- Create a second, empty class, extending the first.
- Generate the documentation.
The documentation of the child class should have nothing—no constants, properties or methods—yet it shows the private constant, property and method of the parent.
Code with which his can be tested: index.txt
Your environment
- Version used: 3.5.3
- Ran PHAR directly from command line with default settings and template.
- PHP version: PHP 8.3.12 (cli). (Also tested with PHP 8.1 and same issue occurs.)
- Operating system: Windows 10 Pro