Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Jun 28, 2022

Upstream PR squizlabs/PHP_CodeSniffer#3546, which is included in PHPCS 3.7.0, changed the tokenization of the parent keyword in new parent() from T_STRING to T_PARENT.

This has consequences for the PassedParameters::hasParameters() method and associated methods:

  • The Collections::parameterPassingTokens() method will now need to include the T_PARENT token.
  • The underlying Collections::functionCallTokens() method should as well.
  • The PassedParameters::hasParameters() method now needs to allow for the T_PARENT token potentially being used as part of a new parent() function call.

This commit fixes all that up.

Includes additional unit tests to safeguard it all (and some more).

@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Jun 28, 2022
@jrfnl jrfnl enabled auto-merge June 28, 2022 13:09
@jrfnl jrfnl force-pushed the passedparameters/hasparameters-account-for-parent-tokenization-change branch 11 times, most recently from 51f6268 to 90617c4 Compare June 28, 2022 19:34
…change for `parent`

Upstream PR squizlabs/PHP_CodeSniffer 3546, which is included in PHPCS 3.7.0, changed the tokenization of the `parent` keyword in `new parent()` from `T_STRING` to `T_PARENT`.

This has consequences for the `PassedParameters::hasParameters()` method and associated methods:
* The `Collections::parameterPassingTokens()` method will now need to include the `T_PARENT` token.
* The underlying `Collections::functionCallTokens()` method should as well.
* The `PassedParameters::hasParameters()` method now needs to allow for the `T_PARENT` token potentially being used as part of a `new parent()` function call.

This commit fixes all that up.

Includes additional unit tests to safeguard it all (and some more).
@jrfnl jrfnl force-pushed the passedparameters/hasparameters-account-for-parent-tokenization-change branch from 90617c4 to 21059b5 Compare June 28, 2022 19:46
@jrfnl jrfnl merged commit 6b4a0e8 into develop Jun 28, 2022
@jrfnl jrfnl deleted the passedparameters/hasparameters-account-for-parent-tokenization-change branch June 28, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant