Skip to content
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

PHPToken polyfill cannot be compatible with PHPToken::getAll on PHP-8.0-dev #2

Open
peter279k opened this issue Aug 24, 2020 · 2 comments

Comments

@peter279k
Copy link

peter279k commented Aug 24, 2020

When looking at the php-8.0-dev tests on GitHub Action, it seems to be failed during PHPUnit test.

The PHPtoken polyfill result is as follows when running IsCheckTest class:

['T_OPEN_TAG', true],
['T_COMMENT', true],
['T_DOC_COMMENT', true],
['T_WHITESPACE', true],
['T_FUNCTION', false],
['T_WHITESPACE', true],
['T_STRING', false],
['(', false],
[')', false],
['T_WHITESPACE', true],
['{', false],

When running PhpToken::getAll on php-8.0-dev, it will be:

['T_OPEN_TAG', true],
['T_COMMENT', true],
['T_WHITESPACE', true], // This is different stuff from PHPToken polyfill
['T_DOC_COMMENT', true],
['T_WHITESPACE', true],
['T_FUNCTION', false],
['T_WHITESPACE', true],
['T_STRING', false],
['(', false],
[')', false],
['T_WHITESPACE', true],
['{', false],
@peter279k
Copy link
Author

I suspect the token_get_all behavior is not same as PhpToken::getAll method.

@peter279k
Copy link
Author

@Ayesh, do you have any idea about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant