{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048","repository_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards","labels_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048/labels{/name}","comments_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048/comments","events_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048/events","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048","id":245004671,"number":1048,"title":"Drop PHPCS 2.x support by August 31, 2018","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars1.githubusercontent.com/u/663378?v=4","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"labels":[{"id":70264628,"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/labels/Type:%20Chores","name":"Type: Chores","color":"fbca04","default":false},{"id":113522231,"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/labels/Type:%20Cleanup","name":"Type: Cleanup","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/milestones/19","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/milestone/19","labels_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/milestones/19/labels","id":2978886,"number":19,"title":"2.0.0","description":"","creator":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars1.githubusercontent.com/u/663378?v=4","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2017-12-14T04:44:21Z","updated_at":"2017-12-14T04:44:47Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2017-07-24T08:20:26Z","updated_at":"2018-02-08T23:18:19Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"As proposed in this comment https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/718#issuecomment-316300210, PHPCS 2.x should be dropped by August 31, 2018 at the latest.\r\n\r\nThat gives other external standards which build onto WPCS a year's time to upgrade their standards.\r\n\r\nThis issue is intended to document what needs to be done to drop PHPCS 2.x support, based on the PHPCS cross-version implementation as pulled in #1047.\r\n\r\nPrerequisite: The minimum supported PHPCS version for WPCS will need to be `3.1.0` or higher.\r\n\r\n### Sniff files:\r\n- [ ] Change namespace from `namespace WordPress...` to `namespace WordPressCS\\WordPress`.\r\n- [ ] Change the `use` statements which refer to PHPCS classes to use the PHPCS 3.x names:\r\n    ```php\r\n    // Current:\r\n    use PHP_CodeSniffer_Sniff as PHPCS_Sniff;\r\n    use PHP_CodeSniffer_File as File;\r\n    use PHP_CodeSniffer_Tokens as Tokens;\r\n\r\n    // Should become:\r\n    use PHP_CodeSniffer\\Sniffs\\Sniff as PHPCS_Sniff;\r\n    use PHP_CodeSniffer\\Files\\File;\r\n    use PHP_CodeSniffer\\Util\\Tokens;\r\n    ```\r\n\r\n### Rulesets:\r\n- [ ] All: remove the `<autoload>./PHPCSAliases.php</autoload>` statement.\r\n- [ ] `./WordPress/ruleset.xml`: adjust `<ruleset name=\"WordPress\" namespace=\"WordPress\">` to `<ruleset name=\"WordPress\" namespace=\"WordPressCS\\WordPress\">`\r\n- [ ] Review which customizations currently done per error code can now be done for the complete sniff in one go. Related #1144 \r\n- [ ] Review other notes in the ruleset about additional customizations / sniff replacements which can be done once the minimum requirement has gone up & action them\r\n\r\n### Cleanup:\r\n- [ ] Remove the `./WordPress/PHPCSAliases.php` file.\r\n- [ ] Remove the `./phpunit.xml.dist` file.\r\n- [ ] Remove the `./Test` subdirectory and all the files therein. The bootstraps and the PHPCS 2.x test suite files are no longer needed as long as the minimum PHPCS version goes up to 3.1.0.\r\n- [ ] Decide whether to keep or remove the `./WordPress/PHPCSHelper.php` file. It might be useful to leave it in place to be used for future PHPCS cross-version compatibility issues. The PHPCS 2.x specific code in the file can be removed.\r\n\r\n### Build script and config files:\r\n- [ ] `.travis.yml`: Remove the PHPCS 2.x specific PHPUnit commands.\r\n- [ ] `.travis.yml`: Stop testing against PHP 5.3 (not supported by PHPCS 3.x).\r\n- [ ] `.travis.yml`: Stop testing against PHPCS 2.x branches.\r\n- [ ] `.travis.yml`: Remove the toggle for the `PHPCS_BIN` location.\r\n- [ ] `.travis.yml`: Limit the downloading of a custom PHPUnit version to HHVM, PHPCS supports PHPUnit 6.x since PHPCS 3.1.0. See #1130\r\n- [ ] `.travis,yml`: If needed: add the PHPCS native bootstrap to the PHPUnit command and/or the `phpunit.xml.dist` file. See https://github.com/squizlabs/PHP_CodeSniffer/pull/1384\r\n- [ ] Update the minimum required PHPCS version in the `composer.json` file.\r\n\r\n### Documentation:\r\n- [ ] Readme: update minimum requirements & remove references to PHPCS 2.x.\r\n- [ ] Contributing: update the unit test instructions.\r\n- [ ] Remove the [PHPCS 3 and testing individual sniffs](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/PHPCS-3-and-testing-individual-sniffs) wiki page as it should no longer apply.\r\n\r\n### Dropping PHP 5.3 support:\r\n- [ ] Remove code related to the `short_open_tag` ini setting from the `XSS.EscapeOutput` sniff.\r\n- [ ] Remove the short_open_tag related line from `.travis.yml`.\r\n- [ ] Remove unit tests work-around for `short_open_tag` ini setting icw PHP 5.3 in the `CodeAnalysis.EmptyStatement`, `Files.FileName`, `WhiteSpace.PrecisionAlignment` sniffs. See #1273, #1274"},"comment":{"url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/comments/364282100","html_url":"https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048#issuecomment-364282100","issue_url":"https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1048","id":364282100,"user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars1.githubusercontent.com/u/663378?v=4","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T23:18:19Z","updated_at":"2018-02-08T23:18:19Z","author_association":"CONTRIBUTOR","body":"The `NamingConventions.ValidVariableName` sniff currently contains a `$php_reserved_vars` property. Once upstream PR squizlabs/PHP_CodeSniffer#1888 has been merged, that property can be removed and the upstream `$phpReservedVars` property can be used instead."}}
{"actor":{"display_login":"jrfnl"}}