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 ) 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/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": { 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. +