Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a1

Bug #16441 Parse error when parsing <<foo>>
Submitted: 2009-07-15 21:34 UTC
From: marcusson Assigned: ashnazg
Status: Closed Package: PhpDocumentor (version 1.4.2)
PHP Version: 5.2.5 OS: Win32
Roadmaps: 1.4.3    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 12 + 48 = ?

 
 [2009-07-15 21:34 UTC] marcusson (Thomas Meyer)
Description: ------------ There is an error in ParserDescCleanup.inc on line 579/580, which causes a UML-style stereotype string within a doc-block, like "<<Singleton>>", to be printed as "Singleton>>". The Parser class tries at this point to interpret escaped tags within the Doc-Block like "<<code>>", where the expected output would be "<code>". However, when the tag is not in the list, it is supposed to leave the text as is. The bug here is, that the Parser does not do that and instead drops the text "<<". Solution: Update file "phpDocumentor/ParserDescCleanup.inc" at lines 579/580 with the following code: } else { $this->addText('<<'); $this->wp->backupPos($word); } As you will notice, the missing call to addText() was the reason for this bug. Test script: --------------- source file: <?php /** * <<Singleton>> A */ class A {} ?> Expected result: ---------------- expected documentation: class <<Singleton>> A Actual result: -------------- actual documentation: class Singleton>> A

Comments

 [2009-08-08 11:50 UTC] ashnazg (Chuck Burgess)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: ashnazg -Roadmap Versions: +Roadmap Versions: 1.4.3
 [2009-08-08 11:54 UTC] ashnazg (Chuck Burgess)
Patched code worked fine on all PHP versions I tested (5.3.0, 5.2.10, 5.2.6, 5.1.6, 5.0.5, 4.4.9), and it does solve the behavior for the sample file.
 [2009-08-08 11:56 UTC] ashnazg (Chuck Burgess)
-Status: Assigned +Status: Closed
Committed to SVN... thanks for the patch, Thomas.