Skip to content

Conversation

@jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Sep 20, 2022

Related to #3546 which fixed an inconsistency after #3484.

The change of the tokenization from T_STRING to T_PARENT for the parent keyword in new parent caused a regression in the PSR12.Classes.ClassInstantiation sniff.

Fixed now.

Includes unit tests.

Fixes #3668

Related to 3546 which fixed an inconsistency after 3484.

The change of the tokenization from `T_STRING` to `T_PARENT` for the `parent` keyword in `new parent` caused a regression in the `PSR12.Classes.ClassInstantiation` sniff.

Fixed now.

Includes unit tests.
@jrfnl
Copy link
Contributor Author

jrfnl commented Sep 20, 2022

FYI: I've done a code search on all sniffs for T_SELF and have verified that any sniffs using T_SELF also take T_PARENT into account (if needed). This has resulted in two more PRs: #3670 and #3671. The other sniffs using T_SELF already handled T_PARENT correctly.

@gsherwood gsherwood added this to the 3.7.2 milestone Sep 22, 2022
gsherwood added a commit that referenced this pull request Sep 22, 2022
@gsherwood gsherwood merged commit d8079e0 into squizlabs:master Sep 22, 2022
@jrfnl jrfnl deleted the feature/3668-psr12-classinstantiation-fix-regression branch September 22, 2022 22:51
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.

PSR12.Classes.ClassInstantiation.MissingParentheses false positive when instantiating parent classes

2 participants