phpdoctor
phpdoctor copied to clipboard
Equal classnames in different namespaces result in endless loop
SPL class: \LogicException my class: \HPO\XQP\LogicException extends \LogicException
debug doclet works, default servlet enters an endless loop in packageWriter.php:239 (_buildTree). Result is segfault if memory is exhausted.
Problem: From a quick glance at the code, it seems the function is called for \HPO\XQP\LogicException, looks for a superclass named 'LogicException' (note missing namespace) and finds \HPO\XQP\LogicException (itself) in that search.... This results in an endless tree to build.
I've made an update to handle program element names with namespaces correctly and to do superclass lookups using the namespace correctly.
Can you give it a test on your code and let me know how you get on please.
The engine seems to work fine!
One or two rough edges: "implemented interfaces" does not include namespaces (and does not link).
I've hopefully fixed the implemented interface code in the same way and added a test. Again, can you test it with your code.
Great!
One more race condition: interface \ns\a; class \ns2\a implements \ns\a; class \ns2\b extends \ns2\a;
=> the "extends" link on \ns2\b points to \ns\a instead of \ns2\a
Menu "all Items" -> only one entry per "name", whereas multiple targets could exist.
Suggestion: Either include a "submenu" or link those entries to an interim page "this name exists here and there" (probably including descriptions).
I have that problem too, if two different packages contain same classes/interfaces, then the doc is broken.
peej - is this considered solved or not? From the above comments I would guess it should work, but it still seems to be broken?