-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect reporting of endTokenPos attribute in recent versions of nikic/php-parser library. #104
Comments
PHP-Parser 4.7.0 canonicalizes token_get_all() output to the PHP 8 format, using T_NAME_* tokens. Does that sound like something that could affect you? E.g. are you using token positions from PHP-Parser, but doing your own token_get_all call? |
* origin/2.x: Temporary resrict installation of broken parser versions, resolves #104
@nikic From what I can see, php-parser reports incorrect position of tokens for nodes. And I'm heavily use this information to adjust original source code (eg to find position where code should be changed). I'm using plain Am I right that indexes reported by php-parser can be used to specify an index for array returned by the |
@lisachenko The token positions returned by php-parser refer to positions into the tokens returned by |
Ok, @nikic! Thanks for the quick response, I should update my code to follow new logic. |
@lisachenko are there any news or plans about using new version of php-parser? I want to upgrade my phpunit to version 9, and it requires "nikic/php-parser": "^4.8" |
@xfuturomax unfortunately, I’m busy with my new job, thus no time for open-source now. If you want - you can contribute this, it shouldn’t be very hard to adopt new version, need only to use proper methods instead of |
I've tested with nikic/php-parser v4.10, and all code was generated correct. |
There are several bug reports in
goaop
framework itself about breaks in code:goaop/framework#451,
goaop/framework#452.
Need to release a hotfix patch version to prevent installation of broken versions.
@nikic, ping
The text was updated successfully, but these errors were encountered: