Skip to content

fix: add escaped closing docblock to escaped sequences#450

Open
bshaffer wants to merge 1 commit intophpDocumentor:6.xfrom
bshaffer:exclude-escaped-closing-phpdoc-from-tags-parsing
Open

fix: add escaped closing docblock to escaped sequences#450
bshaffer wants to merge 1 commit intophpDocumentor:6.xfrom
bshaffer:exclude-escaped-closing-phpdoc-from-tags-parsing

Conversation

@bshaffer
Copy link

The sequence {@*} is valid in PHPdoc as an escape sequence for */. See https://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.desc

New 1.2.0rc1: If you need to use the closing comment "/" in a DocBlock, use the special escape sequence "{@}."

However, in our classfile, the sequence {@*} is now causing the following error:

Running phpdoc to generate structure.xml... 
In Process.php line 271:
                                                                                                                                                                                  
  The command "'phpdoc' '--visibility' 'public,protected,private,internal' '-d' 'src' '--template' 'xml' '--target' 'out'" failed.                                                                                                                                                                           
                                                                                                                                                                                  
  Exit Code: 1(General error)

  Error Output:                                                                                                                                                                   
  ================                                                                                                                                                                
  In docblock.xml.twig line 10:                                                                                                                                                   
                                                                                                                                                                                  
    An exception has been thrown during the rendering of a template ("The arguments array must contain 3 items, 0 given") in "docblock.xml.twig" at line 10 
    
     In DescriptionDescriptor.php line 79:                                                                                                                                           
    The arguments array must contain 3 items, 0 given        

This change updates the regex so that the sequence {@*} is escaped and kept as a literal instead of being parsed as a tag.

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

Successfully merging this pull request may close these issues.

1 participant