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

New Bugs #36

Open
beikov opened this issue Dec 29, 2010 · 4 comments
Open

New Bugs #36

beikov opened this issue Dec 29, 2010 · 4 comments

Comments

@beikov
Copy link

beikov commented Dec 29, 2010

First of all, the generation does not work properly for me because of a problem in inheritDocTag.php on line 73...

PHP Fatal error: Call to a member function text() on a non-object in ...\phpdoctor\classes\inheritDocTag.php on line 73
PHP Stack trace:
PHP 1. {main}() D:\Downloads\phpdoctor\phpdoc.php:0
PHP 2. PHPDoctor->execute() D:\Downloads\phpdoctor\phpdoc.php:55
PHP 3. Standard->standard() D:\Downloads\phpdoctor\classes\phpDoctor.php:1139
PHP 4. ClassWriter->classWriter() D:\Downloads\phpdoctor\doclets\standard\standard.php:166
PHP 5. HTMLWriter->_processInlineTags() D:\Downloads\phpdoctor\doclets\standard\classWriter.php:190
PHP 6. InheritDocTag->text() D:\Downloads\phpdoctor\doclets\standard\htmlWriter.php:302

After this, I get a lot of HTML output and then the error again.

Fatal error: Call to a member function text() on a non-object in ...\phpdoctor\classes\inheritDocTag.php on line 73

Call Stack:
0.0006 335016 1. {main}() D:\Downloads\phpdoctor\phpdoc.php:0
59.7188 58986512 2. PHPDoctor->execute() D:\Downloads\phpdoctor\phpdoc.php:55
59.7291 59869920 3. Standard->standard() D:\Downloads\phpdoctor\classes\phpDoctor.php:1139
71.0484 59962832 4. ClassWriter->classWriter() D:\Downloads\phpdoctor\doclets\standard\standard.php:166
76.7687 60155936 5. HTMLWriter->_processInlineTags() D:\Downloads\phpdoctor\doclets\standard\classWriter.php:190
76.7692 60157608 6. InheritDocTag->text() D:\Downloads\phpdoctor\doclets\standard\htmlWriter.php:302

Not every class or interface is documented, some files are missing.
There are also some other problems i just noticed. If a class/interface is used somewhere, with the fact that it is not imported with the use-keyword because it is in the same package, and somewhere else a class/interface with the same name exists, then it can cause problems. This means in my special case, that there are two interfaces, blabla\cache\Cache and blublu\cache\Cache which are both used like that:

namespace blabla\cache;
class A implements Cache{...}

namespace blublu\cache;
class B implements Cache{...}

Now is the problem that the documentation site of class B is using blabla\cache\Cache and not the right one.

The next thing is, that when I allow different return/parameter types like a simple string and an OOP String like that:

@param \oop\String|string $value The string

Then it does not create a link to the class.

If a classes implement more that one interface, then only one is shown in the doc. Also the methods which these interfaces offer are not included.
If the inheritance is like that:

interface A{}

abstract class B implements A{}

class C extends B{}

Then in C is no documentatino about the interface A!

The field summary is formatted wrong, the left column gets about 50% of the width and this looks strange. I don't know if a link is created to the class doc for throws annotations but in the old version it is not.

A nice feature would be if classes which implement interfaces are mentioned in the doc of the interfaces, this would be more java like with links:

Direct Known Subclasses/Implementations ...

@peej
Copy link
Owner

peej commented Dec 29, 2010

Hi Redshadow,

Do you have some code samples that cause these problems?

Thanks, Paul

@beikov
Copy link
Author

beikov commented Dec 29, 2010

Get the current version of this project(http://sourceforge.net/projects/blazeframework/) and look into the dir "other", there is a Bat-File named buildDoc which calls php-doc.

@beikov
Copy link
Author

beikov commented Dec 29, 2010

The problem was because I had two subpackages cache in different main packages, which both contained an interface Cache. Now I excluded one of the main packages and it worked. Probably one interface has overwritten the entry of the other one... Please check the feature request, i will add some things.

@peej
Copy link
Owner

peej commented Dec 29, 2010

I've made an update to hopefully fix the inheritDoc PHP error.

The multiple items with the same name seems to be a recurring problem for some people. I'll give your code a try and see if there's an easy fix.

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

No branches or pull requests

2 participants