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

3.0: Remove the PHPCSHelper class #1922

Merged
merged 5 commits into from
Jul 9, 2020
Merged

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 6, 2020

... in favour of the PHPCSUtils version of that class which adds:

  • Improved PHPCS cross-version compatibility.
  • More utility methods.

For full details on the upstream class, see the PHPCSHelper class documentation for PHPCSUtils.

The removal is done in three steps, which correspond to the commits in this PR:

  • Deprecate the old code
  • Switch over any uses of the old code
  • Remove the old code

Doing this removal in steps allowed for testing in between, making sure every use of the old class was caught.

Commit Details

PHPCSHelper: deprecate the class and all the methods in it

As everything here is now contained within PHPCSUtils, including updated and/or improved versions of some of these.

PHPCSHelper::get_version(): remove call to the function

This function call is no longer needed now support for PHPCS < 3.5.0 has been dropped.

PHPCSHelper::get_config_data(): switch over to the PHPCSUtils version

PHPCSHelper::get_tab_width(): switch over to the PHPCSUtils version

Remove the PHPCSHelper.php file

All of the methods contained herein are now provided via PHPCSUtils and all code has been switched over to use the PHPCSUtils versions of the methods instead.

jrfnl added 5 commits July 6, 2020 17:39
As everything here is now contained within PHPCSUtils, including updated and/or improved versions of some of these.
This function call is no longer needed now support for PHPCS < 3.5.0 has been dropped.
All of the methods contained herein are now provided via PHPCSUtils and all code has been switched over to use the PHPCSUtils versions of the methods instead.
@GaryJones
Copy link
Member

Not merged, in case this was preferred to be squashed or not.

@jrfnl
Copy link
Member Author

jrfnl commented Jul 8, 2020

@GaryJones As these commits "tell a story", I'm fine with merging as-is, without squashing. If we would squash this, we'd need to make sure that the context if maintained in the new commit message.

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.

None yet

3 participants