Question: page-level docBlock in html included file? #695

sylouuu opened this Issue Dec 4, 2012 · 8 comments

3 participants


This is a very tricky one... see #604.


Thank's boenrobot i'm not alone!

It means is it already fixed?


Unfortunately, no, it's not fixed... and you can see details as to "why" in the linked issue.

Basically, it's a problem with PHP-Parser - the library PhpDocumentor uses to parse files. But solving the issue there would require radical changes in the whole thing.


Ok, so we must ignore these warnings?


For now at least, yes.


Actually, I just remembered... try adding namespace; below your DocBlock, e.g.

    * Header content
    * @author  My name
    * @since 1.0.0
<!DOCTYPE html>
<html lang="fr" class="no-js"> 

That way, you're creating a statement for the docblock to apply to (which is really all PHP-Parser wants).

PhpDocumentor will treat this as a file level doc block, since "namespace" declarations are not documentable.

If for some reason this too fails, try to define an actual namespace, like namespace ns;.

phpDocumentor member

FYI: there is also an improvement open (#40) to allow filtering of specific error types for specific files/folders. This would also solve your issue


Nice tip boenrobot, the namespace ns; below the docBlock works! Thank's a lot.

@sylouuu sylouuu closed this Dec 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment