i have problem using php depend , pmd. when use:
pdepend --summary-xml=/home/<mydirectory>/.sonar/pdepend.xml --suffix=php,php3,php4,php5,phtml,inc /home/<mydirectory>
this result:
parsing...
.................................................. 1260
........................php catchable fatal error: argument 1 passed php_depend_parser_unexpectedtokenexception::__construct() must instance of php_depend_token, integer given, called in /usr/share/php/php/depend/parser.php on line 5444 , defined in /usr/share/php/php/depend/parser/unexpectedtokenexception.php on line 70 php stack trace: php 1. {main}() /usr/bin/pdepend:0 php 2. php_depend_textui_command::main() /usr/bin/pdepend:78 php 3. php_depend_textui_command->run() /usr/share/php/php/depend/textui/command.php:679 php 4. php_depend_textui_runner->run() /usr/share/php/php/depend/textui/command.php:206 php 5. php_depend->analyze() /usr/share/php/php/depend/textui/runner.php:331 php 6. php_depend->performparseprocess() /usr/share/php/php/depend.php:306 php 7. php_depend_parser->parse() /usr/share/php/php/depend.php:560 php 8. php_depend_parser->parseoptionalstatement() /usr/share/php/php/depend/parser.php:370 php 9. php_depend_parser->parseifstatement() /usr/share/php/php/depend/parser.php:5474 php 10. php_depend_parser->parsestatementbody() /usr/share/php/php/depend/parser.php:3195 php 11. php_depend_parser->parsestatement() /usr/share/php/php/depend/parser.php:2320 php 12. php_depend_parser_unexpectedtokenexception->__construct() /usr/share/php/php/depend/parser.php:5444
the same happens with:
phpmd /home/<mydirectory> xml /home/<mydirectory>/sonar_way_php.xml
php catchable fatal error: argument 1 passed php_depend_parser_unexpectedtokenexception::__construct() must instance of php_depend_token, integer given, called in /usr/share/php/php/depend/parser.php on line 5444 , defined in /usr/share/php/php/depend/parser/unexpectedtokenexception.php on line 70 php stack trace:
php 1. {main}() /usr/bin/phpmd:0 php 2. php_pmd_textui_command::main() /usr/bin/phpmd:48 php 3. php_pmd_textui_command->run() /usr/share/php/php/pmd/textui/command.php:151 php 4. php_pmd->processfiles() /usr/share/php/php/pmd/textui/command.php:129 php 5. php_pmd_parser->parse() /usr/share/php/php/pmd.php:203 php 6. php_depend->analyze() /usr/share/php/php/pmd/parser.php:128 php 7. php_depend->performparseprocess() /usr/share/php/php/depend.php:306 php 8. php_depend_parser->parse() /usr/share/php/php/depend.php:560 php 9. php_depend_parser->parseoptionalstatement() /usr/share/php/php/depend/parser.php:370 php 10. php_depend_parser->parseifstatement() /usr/share/php/php/depend/parser.php:5474 php 11. php_depend_parser->parsestatementbody() /usr/share/php/php/depend/parser.php:3195 php 12. php_depend_parser->parsestatement() /usr/share/php/php/depend/parser.php:2320 php 13. php_depend_parser_unexpectedtokenexception->__construct() /usr/share/php/php/depend/parser.php:5444
¿any sugestion? thanks.
it's bug of pdepend , pmd. in /usr/share/php/php/depend/parser.php changed:
private function parsestatement() { if (null === ($stmt = $this->parseoptionalstatement())) { throw new php_depend_parser_unexpectedtokenexception( $this->tokenizer->next(), $this->sourcefile->getfilename() ); } return $stmt; }
for this:
private function parsestatement() { if (null === ($stmt = $this->parseoptionalstatement())) { throw new php_depend_parser_unexpectedtokenexception( new php_depend_token, $this->sourcefile->getfilename() ); } return $stmt; }
i obtain warnings , process continue:
php warning: missing argument 1 php_depend_token::__construct(), called in /usr/share/php/php/depend/parser.php on line 5442 , defined in /usr/share/php/php/depend/token.php on line 121
we can wait next upgrade ;)
Comments
Post a Comment