# Parsing problem, expecting Lexer #1109

Closed
opened this Issue Jan 20, 2014 · 8 comments

Projects
None yet
2 participants
Contributor

### flip111 commented Jan 20, 2014

 Hi this is my first time using phpdocumentator, but i can't get it to work. C:\inetpub\symfony23>bin\phpdoc.php.bat -d src -t docs/code Collecting files .. OK Initializing parser .. OK Parsing files Parsing C:\inetpub\symfony23\src\Acme\DemoBundle\AcmeDemoBundle.php [2014-01-20 10:13:12] phpDocumentor.ERROR: E_RECOVERABLE_ERROR: Argument 1 passed to PHPParser_Parser::parse() must be an instance of PHPParser_Lexer, string given, called in C:\in etpub\symfony23\vendor\phpdocumentor\reflection\src\phpDocumentor\Reflection\Traverser.php on line 52 and defined {"file":"C:\\inetpub\\symfony23\\vendor\\nikic\\php-parser\\lib\\P HPParser\\Parser.php","line":903} []  It's a symfony 2.3 project
Owner

### mvriel commented Jan 22, 2014

 This seems to be related to #1110, we will fix #1110 and then I would like to ask you to test the fix against your codebase

Closed

Owner

### mvriel commented Feb 16, 2014

 It would seem that #1110 and this issue are not related; issue #1110 was about constants and this is apparently something else. I will need to investigate this as well.
Owner

### mvriel commented Feb 16, 2014

 Is it possible that you have included phpDocumentor using composer? It would appear that an old version of the PHP-Parser dependency is being called because the error that you show is no longer present since May 4th 2012. I recommend updating your installation or doing a fresh install. When in doubt; please download the phar executable and use that since all dependencies are included.

Contributor

### flip111 commented Feb 17, 2014

 That's right version 0.9.1 of PHP-Parser was required by this library https://github.com/schmittjoh/JMSTranslationBundle However when looking at https://github.com/phpDocumentor/phpDocumentor2/blob/develop/composer.json i don't see the dependency on PHP-Parser. Possibly one of the components itself depend on PHP-Parser??
Owner

### mvriel commented Feb 17, 2014

 It is required by the Reflection component; if you review his composer.json you will see it :)
Contributor

### flip111 commented Feb 17, 2014

 The reflection component require PHP-Parser 0.9.0 or greater. See: https://github.com/phpDocumentor/Reflection/blob/master/composer.json#L15 So either this is an issue of phpDocumentor/Reflection not depending on the right version of PHP-Parser. Or phpDocumentor/phpDocumentor2 is not depending on the right version of phpDocumentor/Reflection. By the way PHP-Parser version 0.9.0 is (more then) 2 years old. 0.9.4 is the latest from 6 months ago https://github.com/nikic/PHP-Parser/releases Possibly this issue needs to be reopened or moved to the phpDocumentor/Reflection repo???

Owner

### mvriel commented Feb 17, 2014

 You are right, the Reflection component should be updated to require 0.9.4 as a minimum. I have reopened the issue as a reminder to do that

Owner

### mvriel commented Mar 26, 2014

 This issue has been resolved in the mean time