Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equal classnames in different namespaces result in endless loop #7

Open
KampfCaspar opened this issue May 12, 2010 · 7 comments
Open

Comments

@KampfCaspar
Copy link
Contributor

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.

@peej
Copy link
Owner

peej commented May 15, 2010

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.

@KampfCaspar
Copy link
Contributor Author

The engine seems to work fine!

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

@peej
Copy link
Owner

peej commented May 16, 2010

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

@KampfCaspar
Copy link
Contributor Author

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
Copy link
Contributor Author

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

@beikov
Copy link

beikov commented Dec 29, 2010

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

@DerManoMann
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants