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

Tokenizer/PHP: bug fix - parent/static keywords in class instantiations #3546

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Feb 10, 2022

Follow up on #3484 /cc @kukulich

Just like new class, new parent, new self and new static should also be preserved and with the parent, self and static keywords remaining as their dedicated token.

  • For new static, the tokenization changed due to the context sensitive keywords change. This has now been fixed.
  • new self was fine before and is still fine.
  • new parent apparently wasn't handled correctly, even before the change. The condition which was in place for handling the same situation for self has now been updated to also handle parent.

Includes unit tests.

Follow up on 3484

Just like `new class`, `new parent`, `new self` and `new static` should also be preserved and with the `parent`, `self` and `static` keywords remaining as their dedicated token.

* For `new static`, the tokenization changed due to the context sensitive keywords change. This has now been fixed.
* `new self` was fine before and is still fine.
* `new parent` apparently wasn't handled correctly, even before the change. The condition which was in place for handling the same situation for `self` has now been updated to also handle `parent`.

Includes unit tests.
@jrfnl
Copy link
Contributor Author

jrfnl commented Feb 10, 2022

@gsherwood Could this PR please be milestoned to 3.7.0 ?

@gsherwood gsherwood added this to the 3.7.0 milestone Feb 21, 2022
gsherwood added a commit that referenced this pull request Feb 22, 2022
@gsherwood gsherwood merged commit eab6be9 into squizlabs:master Feb 22, 2022
@gsherwood
Copy link
Member

Thanks for fixing this

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

Successfully merging this pull request may close these issues.

2 participants