Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Parsing problem, expecting Lexer #1109

Closed
flip111 opened this Issue · 8 comments

2 participants

@flip111

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

@mvriel
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

@mvriel
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.

@mvriel
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.

@mvriel mvriel closed this
@flip111

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

@mvriel
Owner

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

@flip111

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

@mvriel mvriel reopened this
@mvriel
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

@mvriel mvriel modified the milestone: 2.4, 2.3
@mvriel
Owner

This issue has been resolved in the mean time

@mvriel mvriel closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.