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

Remove PHPCS 2.X support #190

Closed
tomjn opened this issue Jul 25, 2018 · 2 comments
Closed

Remove PHPCS 2.X support #190

tomjn opened this issue Jul 25, 2018 · 2 comments

Comments

@tomjn
Copy link
Contributor

tomjn commented Jul 25, 2018

WPCS 1.0 is deprecating support for PHPCS 2, which means we won't be able to support PHPCS 2 anyway. We should do the same, and remove the polyfills added to make things work with v2 of PHPCS

@tomjn tomjn changed the title Deprecate PHPCS 2.X Remove PHPCS 2.X support Jul 25, 2018
@GaryJones
Copy link
Contributor

GaryJones commented Aug 8, 2018

Items seen in passing:

  • Remove ^2.9.0 || constraint in composer.json.
  • PHPCS 3.x requires PHP 5.4+, so the "php": ">=5.3" requirement in composer.json can be updated to something more recent.
  • Remove the autoloading of the PHPCSCompatibility.php file.
  • Remove the PHPCSCompatibility.php file, which loaded an aliases file from WPCS.
  • Update implementations of \PHP_CodeSniffer_Sniff to be PHP_CodeSniffer\Sniffs\Sniff.
  • Update single extends of \PHP_CodeSniffer_Standards_AbstractScopeSniff to be PHP_CodeSniffer\Sniffs\AbstractScopeSniff.
  • Update any other PHPCS 2.x classes, per the alias file. Tests/ already seem to be using PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest.
  • Remove PHP 5.3 / PHPCS 2.9 references from .travis.yml.

@GaryJones
Copy link
Contributor

Remove the autoloading of the PHPCSCompatibility.php file.
Remove the PHPCSCompatibility.php file, which loaded an aliases file from WPCS.

While we still rely on WPCS classes directly, some aliases need to be maintained, either by referencing the WPCS aliases file, or including an aliases file in VIPCS.

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

No branches or pull requests

2 participants