From ba1e4ba976f0bfe0e9c00ac55bc600d9db8b06e7 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Sun, 1 Oct 2023 16:53:03 +0100 Subject: [PATCH 1/3] bump VIPCS and WPCS to v3 --- provision/core/phpcs/composer.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/provision/core/phpcs/composer.json b/provision/core/phpcs/composer.json index b5a018169..b98d5bff9 100644 --- a/provision/core/phpcs/composer.json +++ b/provision/core/phpcs/composer.json @@ -12,10 +12,11 @@ "issues": "https://github.com/Varying-Vagrant-Vagrants/VVV/issues/" }, "require": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", - "automattic/vipwpcs": "^2.3.3", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0.0", + "automattic/vipwpcs": "^3", "phpcompatibility/php-compatibility": "^9.3.5", - "phpcompatibility/phpcompatibility-wp": "^2.1.4" + "phpcompatibility/phpcompatibility-wp": "^2.1.4", + "wp-coding-standards/wpcs": "^3.0.1" }, "config": { "allow-plugins": { From 7a9b73fbcd3c67db73ceb734a74688853d0c5e33 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Sun, 1 Oct 2023 16:58:45 +0100 Subject: [PATCH 2/3] added a readme for PHPCS as well as an ignore file for installed files --- provision/core/phpcs/.gitignore | 3 +++ provision/core/phpcs/readme.md | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 provision/core/phpcs/.gitignore create mode 100644 provision/core/phpcs/readme.md diff --git a/provision/core/phpcs/.gitignore b/provision/core/phpcs/.gitignore new file mode 100644 index 000000000..546ef8ae5 --- /dev/null +++ b/provision/core/phpcs/.gitignore @@ -0,0 +1,3 @@ +vendor/ +bin/ +composer.lock diff --git a/provision/core/phpcs/readme.md b/provision/core/phpcs/readme.md new file mode 100644 index 000000000..ba0d13ab5 --- /dev/null +++ b/provision/core/phpcs/readme.md @@ -0,0 +1,8 @@ +## VVV PHPCS setup + +This folder houses a composer file that installs PHPCS. If PHPCS fails, you can destroy/nuke the vendor and bin folders, as well as the lock file, and re-provision, or even run composer yourself on the host. + +The goal for us in terms of packages is to enable both WordPress and VIP coding standards, with PHP compat thrown in for good measure. + +Additionally, this is in a shared folder so that you can use the same PHPCS install in your VVV VM as well as your IDE/editor. + From 21ef1c385ff79b95c2576adda9d760dc1f8bbbbb Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Sun, 1 Oct 2023 16:58:55 +0100 Subject: [PATCH 3/3] updated the changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45585bcf1..e738822bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ permalink: /docs/en-US/changelog/ ### Enhancements * Switched the default PHP to v8.0 ( #2658 ) -* Experimental docker support ( #2632 ) +* WP Coding standards v3 ( #2688 ) +* VIP Coding standards v3 ( #2688 ) ## 3.12 ( 2023 August 3rd )