{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/_s/issues/1311","repository_url":"https://api.github.com/repos/Automattic/_s","labels_url":"https://api.github.com/repos/Automattic/_s/issues/1311/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/_s/issues/1311/comments","events_url":"https://api.github.com/repos/Automattic/_s/issues/1311/events","html_url":"https://github.com/Automattic/_s/pull/1311","id":348980979,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3MjAzMTA1","number":1311,"title":"CS/QA update for WPCS 1.0.0, PHPCS 3.3.1 & PHPCompatibility","user":{"login":"jrfnl","id":663378,"node_id":"MDQ6VXNlcjY2MzM3OA==","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":101981869,"node_id":"MDU6TGFiZWwxMDE5ODE4Njk=","url":"https://api.github.com/repos/Automattic/_s/labels/Has%20Patch","name":"Has Patch","color":"bfe5bf","default":false},{"id":12368521,"node_id":"MDU6TGFiZWwxMjM2ODUyMQ==","url":"https://api.github.com/repos/Automattic/_s/labels/Second%20Opinion","name":"Second Opinion","color":"02d7e1","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-08-09T05:17:32Z","updated_at":"2018-11-19T16:16:14Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Automattic/_s/pulls/1311","html_url":"https://github.com/Automattic/_s/pull/1311","diff_url":"https://github.com/Automattic/_s/pull/1311.diff","patch_url":"https://github.com/Automattic/_s/pull/1311.patch"},"body":"<!-- Thanks for contributing to Underscores! Please provide as much information as possible with your Pull Request by filling out the following - this helps make reviewing much quicker! -->\r\n\r\n## Changes proposed in this Pull Request:\r\n\r\nThis PR updates the CS/QA related toolset to use the latest versions of these tools and updates the code-base to comply.\r\n\r\n## Commit details:\r\n\r\n### QA: Break stylesheets out of browser cache on each new release of a theme\r\n\r\n_WPCS 1.0.0 contains a new sniff which identifies this issue, which is why it has to be solved for the update to be possible_\r\n\r\n**Type: Functional change**\r\n\r\nThe `wp_enqueue_style()` function allows for passing a `$version` parameter which is used to force browsers to load a fresh copy of a stylesheet when it has been changed.\r\n\r\nIf this parameter is not passed, the version number will be set to the version of the WP install which doesn't make sense at all for a theme which is not shipped with WP itself.\r\n\r\nThis commit adds a `_S_VERSION` constant which should be changed to the current version number of the actual finished theme on each new release.\r\n\r\nThis constant is subsequently used in all `wp_enqueue_style()` function calls to ensure that on each new release of the theme, the browser cache is cleared for these stylesheets.\r\n\r\nRef: https://developer.wordpress.org/reference/functions/wp_enqueue_style/\r\n\r\n---\r\n\r\n### CS: Minor fixes to comply with WPCS 1.0.0 / PHPCS 3.3.1\r\n\r\n**Type: CS update**\r\n\r\nNothing very interesting, just some minor fixes to comply with the latest versions of all sniffs being tested against.\r\n\r\n---\r\n\r\n### Use PHPCompatibilityWP\r\n\r\n**Type: Build tools**\r\n\r\nSince mid July, the PHPCompatibility project offers dedicated CMS rulesets which already account for all back-fills/poly-fills.\r\n\r\nThis commit removes the `_s` native version of that ruleset in favour of using this dedicated WP-based ruleset.\r\n\r\nAdditionally, the PHPCompatibility repo has moved to a dedicated GitHub organisation, so that change is included here as well.\r\n\r\nRefs:\r\n* https://github.com/PHPCompatibility/PHPCompatibility/releases/tag/8.2.0\r\n* https://github.com/phpcompatibility/phpcompatibilitywp\r\n\r\n**Note**: I would strongly recommend installing these dependencies via Composer instead. @grappler has created a good setup for this in PR #1291 which I would recommend for merging, though it will need to be updated to be in line with the changes made in this PR.\r\n\r\n---\r\n\r\n### Use WPCS 1.0.0 and sniff against a high PHP version for the fastest and most reliable results.\r\n\r\n**Type: Build tools**\r\n\r\nNo ruleset changes are needed.\r\n\r\nRefs: https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases/tag/1.0.0\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/_s/issues/comments/439949920","html_url":"https://github.com/Automattic/_s/pull/1311#issuecomment-439949920","issue_url":"https://api.github.com/repos/Automattic/_s/issues/1311","id":439949920,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTk0OTkyMA==","user":{"login":"jrfnl","id":663378,"node_id":"MDQ6VXNlcjY2MzM3OA==","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-11-19T16:16:14Z","updated_at":"2018-11-19T16:16:14Z","author_association":"CONTRIBUTOR","body":"@limestreet I'm aware - see: https://github.com/Automattic/_s/pull/1311#issuecomment-427703801"}}
{"actor":{"display_login":"jrfnl"}}