Rector: Could not process

Created on 13 Apr 2020  路  3Comments  路  Source: rectorphp/rector

Question

Not sure this is a bug because I cannot replicate it on the DEMO site. However I am using latest rector installed today and get the following error when trying to run any of the set on any files.

"Call to undefined method PhpParser\Comment\Doc::getStartTokenPos()".  

Most helpful comment

It's a conflict of PHPStan and php-parser 4.4, see: https://github.com/rectorphp/rector/pull/3156#issue-402038893

There should be limit in composer.json to allow only php-parser 4.3

All 3 comments

It's a conflict of PHPStan and php-parser 4.4, see: https://github.com/rectorphp/rector/pull/3156#issue-402038893

There should be limit in composer.json to allow only php-parser 4.3

Thanks

To clarify https://github.com/rectorphp/rector/issues/3160#issuecomment-612787069 for others: use this in your composer.json:

"nikic/php-parser": "4.3.*",
Was this page helpful?
0 / 5 - 0 ratings