PhpDocumentor page level docBlock in html file included

I use the tool from phpdoc.org and I get stuck when I have a PHP file, such as header.inc.php, only inside HTML.

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

I get an error in my phpdoc "No page-level DocBlock found in the file ...". I googled, but I did not find any user with my case.

How to fix this error? Any advice is appreciated.

Thank you in!

Hello

+2
source share
2 answers

Ok anwser found: https://github.com/phpDocumentor/phpDocumentor2/issues/695

TL DR: It is not fixed at the moment, just ignore the thesis warnings.

0
source

I just stumbled upon this post, and although it's older, I thought I'd add my two cents. Although sylouuu is right about placing the namespace immediately after your alleged DocBlock at page level, I believe that now I need to place the @package tag in DocBlock. There is some caution here when dealing with logical and hierarchical "packages." This behavior mainly depends on which version of PHPDocumentor you are using.

From: http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_elements.pkg.html "In phpDocumentor version 1.2.2, the page-level DocBlock is the first DocBlock in the file if it contains the @package tag."

And in https://github.com/phpDocumentor/phpDocumentor2/issues/910 you can read that more recently, like a month ago, the DocBlocks problem at the page level in files without PHP code / nodes still work. Thus, since sylouuu has announced the addition of a namespace, as soon as you do this, you have a document element and your problem needs to be resolved. In addition, since most likely no documentation for the page will be created without the presence of a node, this allows your html file to create its own documentation.

Hope this helps! sv

+1
source

Source: https://habr.com/ru/post/978181/


All Articles