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

Bug #9345 help output broken
Submitted: 2006-11-15 23:42 UTC
From: hholzgra Assigned: cellog
Status: Closed Package: PHP_ParserGenerator (version CVS)
PHP Version: 5.2.0 RC4 OS: *
Roadmaps: (Not assigned)    
Subscription  


 [2006-11-15 23:42 UTC] hholzgra (Hartmut Holzgraefe)
Description: ------------ "phplemon --help" is broken in that it leads to a "call to undefined function" error message. The called function is actually a method of the calling class itself so it is simply missing the $this-> prefix. Adding the prefix doesn't really help though, useage output is now produced but it is severely mangled. As a sidenode WTF: why does this package come with its own cmdline parameter parsing? Why doesn't it use Console_Getargs which looks similar to what is tried here but actually works? Test script: --------------- phplemon --help Expected result: ---------------- readable useage output Actual result: -------------- PHP Fatal error: Call to undefined function OptPrint() in /usr/local/lib/php/PHP/ParserGenerator.php on line 265 after changing OptPrint to $this->OptPrint on that line: -s b -s c D=<string>s Define an %ifdef macro. -s g -s m -s q -s s -s x exception 'Exception' with message 'Command line syntax error: undefined option "-h"' in /usr/local/lib/php/PHP/ParserGenerator.php:162 Stack trace: #0 /usr/local/lib/php/PHP/ParserGenerator.php(258): PHP_ParserGenerator->handleflags(1, Array) #1 /usr/local/lib/php/PHP/ParserGenerator.php(412): PHP_ParserGenerator->OptInit(Array) #2 /usr/local/lib/php/PHP/ParserGenerator/cli.php(4): PHP_ParserGenerator->main() #3 {main}

Comments

 [2006-11-16 03:36 UTC] cellog (Greg Beaver)
this package is a direct port of Lemon, and so uses Lemon's parameter parsing. I would *welcome* a patch to use Console_Getargs, and in fact you can feel free to commit this directly to cvs (with a heads-up note to me first), if you want.
 [2006-12-16 04:02 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2008-04-18 23:07 UTC] adaniels (Arnold Daniels)
For some reason the fix to this bug hasn't made it into version 0.1.5. Can someone please fix it?