diff --git a/composer.json b/composer.json index 526516f176..34d13463bb 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/composer.lock b/composer.lock index 08c0f3dc01..308c686a47 100644 --- a/composer.lock +++ b/composer.lock @@ -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": [], diff --git a/tests/phpunit/tests/functions.php b/tests/phpunit/tests/functions.php index 453d3c8ad8..88b9a46475 100644 --- a/tests/phpunit/tests/functions.php +++ b/tests/phpunit/tests/functions.php @@ -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( diff --git a/tests/phpunit/tests/user.php b/tests/phpunit/tests/user.php index b15aa6060d..01be5de452 100644 --- a/tests/phpunit/tests/user.php +++ b/tests/phpunit/tests/user.php @@ -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