Build Tools: Upgrade WPCS to 2.0.0.
A few sniffs have been renamed, this change includes the relevant `phpcs:ignore` comment updates. Fixes #46002. git-svn-id: https://develop.svn.wordpress.org/trunk@44645 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d3ee420c14
commit
2ec6c8f3d3
@ -11,7 +11,7 @@
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "~0.5.0",
|
||||
"wp-coding-standards/wpcs": "~1.2.0"
|
||||
"wp-coding-standards/wpcs": "~2.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "phpcbf --standard=phpcs.xml.dist --report-summary --report-source",
|
||||
|
20
composer.lock
generated
20
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c3625c9fc2ce3a44cad41a64f258bafd",
|
||||
"content-hash": "c7426ffeca8db395605e43bccf174b02",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
@ -126,24 +126,26 @@
|
||||
},
|
||||
{
|
||||
"name": "wp-coding-standards/wpcs",
|
||||
"version": "1.2.1",
|
||||
"version": "2.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git",
|
||||
"reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c"
|
||||
"reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c",
|
||||
"reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c",
|
||||
"url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce",
|
||||
"reference": "c9eaadaafefce36b3cb7e06eb15305b8c4cae9ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"squizlabs/php_codesniffer": "^2.9.0 || ^3.0.2"
|
||||
"php": ">=5.4",
|
||||
"squizlabs/php_codesniffer": "^3.3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpcompatibility/php-compatibility": "^9.0"
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
|
||||
"phpcompatibility/php-compatibility": "^9.0",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
|
||||
},
|
||||
"suggest": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
|
||||
@ -165,7 +167,7 @@
|
||||
"standards",
|
||||
"wordpress"
|
||||
],
|
||||
"time": "2018-12-18T09:43:51+00:00"
|
||||
"time": "2019-01-16T10:13:16+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
@ -7,7 +7,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
function test_wp_parse_args_object() {
|
||||
$x = new MockClass;
|
||||
$x->_baba = 5;
|
||||
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
|
||||
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
||||
$x->a = array( 5, 111, 'x' );
|
||||
$this->assertEquals(
|
||||
array(
|
||||
@ -43,7 +43,7 @@ class Tests_Functions extends WP_UnitTestCase {
|
||||
function test_wp_parse_args_defaults() {
|
||||
$x = new MockClass;
|
||||
$x->_baba = 5;
|
||||
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
|
||||
$x->yZ = 'baba'; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
||||
$x->a = array( 5, 111, 'x' );
|
||||
$d = array( 'pu' => 'bu' );
|
||||
$this->assertEquals(
|
||||
|
@ -199,7 +199,7 @@ class Tests_User extends WP_UnitTestCase {
|
||||
* @ticket 20043
|
||||
*/
|
||||
public function test_user_unset() {
|
||||
// phpcs:disable WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar
|
||||
// phpcs:disable WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
|
||||
$user = new WP_User( self::$author_id );
|
||||
|
||||
// Test custom fields
|
||||
|
Loading…
Reference in New Issue
Block a user