Skip to content

[Hot fix] Tokenizer/PHP: 2 bug fixes for improved context sensitive keyword support #3608

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

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jun 12, 2022

Tokenizer/PHP: bug fix in improved context sensitive keyword support [1]

As reported in #3607, the eval keyword was not included in the list of context sensitive keyword. This is a regression compared to PHPCS 3.6.2.

Fixed now, including unit tests.

Fixes #3607

Tokenizer/PHP: bug fix in improved context sensitive keyword support [2]

While investigating #3607, I figured adding a test with a function declared to return by reference would also not be amiss and found that that situation was not accounted for.

This commit fixes that.
Includes unit test.

jrfnl added 2 commits June 12, 2022 20:46
As reported in 3607, the `eval` keyword was not included in the list of context sensitive keyword. This is a regression compared to PHPCS 3.6.2.

Fixed now, including unit tests.

Fixes 3607
While investigating 3607, I figured adding a test with a function declared to return by reference would also not be amiss and found that that situation was not accounted for.

This commit fixes that.
Includes unit test.
@jrfnl
Copy link
Contributor Author

jrfnl commented Jun 12, 2022

@gsherwood Both of the above fixes are fixes for regressions against PHPCS 3.6.2. With that in mind, I believe this PR should still be included in PHPCS 3.7.0.

@gsherwood gsherwood merged commit d9cf568 into squizlabs:master Jun 13, 2022
@gsherwood gsherwood added this to the 3.7.0 milestone Jun 13, 2022
@gsherwood
Copy link
Member

Thanks so much for fixing this, and so quickly!

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

Successfully merging this pull request may close these issues.

Method with name eval is always reported as error
2 participants