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

Follow up on version drop/ remove some more code #369

Merged
merged 4 commits into from
Oct 17, 2022

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 17, 2022

BackCompat\BCTokens: remove the tokenName() method

Follow up on #250 and #347.

PR #250 introduced a polyfill for the PHPCS native Tokens::tokenName() method as this method was only available in PHPCS 3.0.0 and higher.

However, after the version drop, this method is no longer needed as the PHPCS native functionality can now be used in all cases.
This was missed in the version drop PR #347.

The method can be safely removed as it was never in a tagged release.

Note: as PHPCS itself does not have any tests for the native method, I'm keeping the associated test class and moving it to a separate Xtra directory for tests not directly related to PHPCSUtils. These tests should probably be pulled upstream at some point.

Utils\Parentheses: minor code simplification

Utils\PassedParameters: minor code simplification

The "valid identifier" check was only in place to handle BC for PHPCS < 3.6.0 and should no longer be needed.

SplitImportUseStatementTest: minor tweak

Remove a line which was only added to the test case file for a PHPCS cross-version support issue, which was fixed in PHPCS 3.7.0, meaning that this line is no longer needed.

See #287 for more information.

jrfnl added 4 commits October 17, 2022 09:33
Follow up on 250 and 347.

PR 250 introduced a polyfill for the PHPCS native `Tokens::tokenName()` method as this method was only available in PHPCS 3.0.0 and higher.

However, after the version drop, this method is no longer needed as the PHPCS native functionality can now be used in all cases.
This was missed in the version drop PR 347.

The method can be safely removed as it was never in a tagged release.

Note: as PHPCS itself does not have any tests for the native method, I'm keeping the associated test class and moving it to a separate `Xtra` directory for tests not directly related to PHPCSUtils. These tests should probably be pulled upstream at some point.
The "valid identifier" check was only in place to handle BC for PHPCS < 3.6.0 and should no longer be needed.
Remove a line which was only added to the test case file for a PHPCS cross-version support issue, which was fixed in PHPCS 3.7.0, meaning that this line is no longer needed.

See 287 for more information.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Oct 17, 2022
@jrfnl jrfnl merged commit 3cb1d7d into develop Oct 17, 2022
@jrfnl jrfnl deleted the feature/347-version-drop-follow-up branch October 17, 2022 07:55
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.

1 participant