# phpDocumentor/phpDocumentor2

### Subversion checkout URL

You can clone with HTTPS or Subversion.

# Parsing problem, expecting Lexer#1109

Closed
opened this Issue · 8 comments

### 2 participants

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

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

referenced this issue
Closed

### Getting error while parsing #1110

Owner

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

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.

closed this

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

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

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???

reopened this
Owner

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

modified the milestone: 2.4, 2.3
Owner

This issue has been resolved in the mean time

closed this