-
Notifications
You must be signed in to change notification settings - Fork 122
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
AbstractUnitObject.php (Line 542): Call to a member function getAttribute() on null #190
Comments
I am still experiencing this exact issue with phpDox 0.7.0-96-g4369b37. I confirmed that the fix is in place in this version. After running a second time, it works.
|
It may look like it's the same issue and I agree it's the same type of problem but in this case it's a different line caused by a different (error) condition. I'm a bit buffled as how you managed to get phpDox into that state though as I cannot come up with any way to trigger this problem. Would it be possible to provide a (simple?) testcase so I can reproduce and fix this? |
@ZyanKLee Would it be possible for you to provide me with a small testcase to reproduce this? |
According to the error message phpdox ran through The application that is parsed by phpdox in my case is closed source, so obviously I can't point you at some repository or else. |
Some unit of your application extends a class or implements an interface (or possibly uses a trait) where the definition of it cannot be found. That is unfortunate - since it will lead to an incomplete API documentation - but not a problem for phpDox. The purpose of the method the crash occurs in is to set a marker for easier processing (e.g. do not place a link when rendering html). The crash occurs, because obviously the XPath query does not return any nodes. While the crash can easily be avoided by handling this condition, I really want to understand why that can happen first. And so far I failed to produce a test code that triggers this issue. |
Commit d18416c adds a new exception for this error condition with additional information that should make debugging this easier. @ZyanKLee Could you run this against your code again and check whether or not you get a more meaningful output? The bug is of course not yet fixed, just the reporting changed. |
ok, that seems a lot more helpfull ;)
though that file is present and the interface is declared in that file:
I'll ask our devs to have a look at it, as well. Just to be sure, this is not an error in our app. EDIT: Devs say, everything is fine - because we can log in ;) |
That error message is interesting as "Project-1" is syntactically invalid for a PHP Namespace. A namespace definition may not contain "-". Can you provide me with the XML file generated for the unit "Project-1\AuthBundle\Entity\User"? |
On related note: The fact your code works doesn't mean that the API documentation has knowledge of the interface. Actually, the very fact you get the error message shows that phpDox cannot resolve the interface |
ahh, yes. that "Project-1"-thing is a search'n'replace error by me. I replaced the project related facts by replacing them with the placeholder "project-1". In fact this were two uppercase letters, i.e. AB.. Perhaps you can help us with the config. Our phpdox.xml is at "the other bug": #209 (comment) |
@ZyanKLee: Can you please provide me with the XML file generated for the unit "Project-1\AuthBundle\Entity\User"? Freel free to strip all methods and properties from it. You can send it to my email account. |
I think I found the reason for this issue. |
latest master worked for me. thanks for the effort! |
Thank you for the update. I consider this issue fixed then. |
Getting the following error when trying to generate documentation after clearing the cache.
If I run
phpdox
again (now some caches exist) it compiles the documentation:However, the finished documentation does not include any content from the enrichers.
In case it is relevant, my config file:
The text was updated successfully, but these errors were encountered: