phpdoctor icon indicating copy to clipboard operation
phpdoctor copied to clipboard

Equal classnames in different namespaces result in endless loop

Open KampfCaspar opened this issue 15 years ago • 7 comments

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.

KampfCaspar avatar May 12 '10 12:05 KampfCaspar

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.

peej avatar May 15 '10 17:05 peej

The engine seems to work fine!

One or two rough edges: "implemented interfaces" does not include namespaces (and does not link).

KampfCaspar avatar May 16 '10 00:05 KampfCaspar

I've hopefully fixed the implemented interface code in the same way and added a test. Again, can you test it with your code.

peej avatar May 16 '10 12:05 peej

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

KampfCaspar avatar May 17 '10 08:05 KampfCaspar

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).

KampfCaspar avatar May 17 '10 08:05 KampfCaspar

I have that problem too, if two different packages contain same classes/interfaces, then the doc is broken.

beikov avatar Dec 29 '10 19:12 beikov

peej - is this considered solved or not? From the above comments I would guess it should work, but it still seems to be broken?

DerManoMann avatar Aug 01 '11 14:08 DerManoMann