You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is some cascaded inheritances, the final class might not have the right method signatures.
Expected behavior
In a cascade of inheritances, when an intermediate class override a base class method, the final class should have the last override in its documentation.
Actual behavior
Actually, the final class have an incorrect documentation pretending that it still inherits the base method.
Steps to reproduce the problem
Create three classes into an empty directory in respectively BaseClass.php, InterClass.php and FinalClass.php
Open the documentation index .phpdoc/build/index.html in a browser and navigate to FinalClass doc page (.phpdoc/build/classes/FinalClass.html).
Notice that the documented __construct is the one from BaseClass instead of the one from InterClass, the signature is incomplete and a mandatory argument is missing. Trying to use it according to this doc will lead to a "PHP Warning: Uncaught ArgumentCountError: Too few arguments to function MiddleClass::__construct()".
Click on the __construct link and notice that it ends on .phpdoc/build/classes/BaseClass.html#method___construct.
Thanks for your report, I pushed a fix and it will be available in the next build of our docker image. If you are not using docker it will be part of the next release.
Your detailed report really helped to find the issue to thank you very much for that!
I was planning to do that after this issue was closed but another urgent bug popped up, that needs to be solved before I can do a new release. I still hope I will be able to do that before the end of this month. But I'm a bit depending on others here .
When there is some cascaded inheritances, the final class might not have the right method signatures.
Expected behavior
In a cascade of inheritances, when an intermediate class override a base class method, the final class should have the last override in its documentation.
Actual behavior
Actually, the final class have an incorrect documentation pretending that it still inherits the base method.
Steps to reproduce the problem
.phpdoc/build/index.html
in a browser and navigate toFinalClass
doc page (.phpdoc/build/classes/FinalClass.html
).__construct
is the one fromBaseClass
instead of the one fromInterClass
, the signature is incomplete and a mandatory argument is missing. Trying to use it according to this doc will lead to a "PHP Warning: Uncaught ArgumentCountError: Too few arguments to function MiddleClass::__construct()".__construct
link and notice that it ends on.phpdoc/build/classes/BaseClass.html#method___construct
.Your environment
The text was updated successfully, but these errors were encountered: