Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
"require": {
"arubacao/tld-checker": "^1.2",
"composer/installers": "^2.0",
"php": "^7|^8",
"php": "^8",
"swaggest/json-schema": "^0.12",
"symfony/polyfill-intl-idn": "^1.12",
"symfony/validator": "^7.0 || ^6.0"
},
"require-dev": {
"10up/wp_mock": "^1.0",
"automattic/vipwpcs": "^3.0",
"boxuk/coding-standards": "^0.4.0",
"permafrost-dev/coverage-check": "^2.0",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"symplify/monorepo-builder": "^11.2",
Expand Down Expand Up @@ -48,6 +49,10 @@
],
"type": "composer",
"url": "https://wpackagist.org"
},
{
"type": "git",
"url": "https://github.com/boxuk/coding-standards.git"
}
],
"minimum-stability": "dev",
Expand Down
48 changes: 26 additions & 22 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<?xml version="1.0"?>
<ruleset name="BoxUK">
<description>BoxUK Coding Standards</description>
<ruleset name="BoxUK WordPress Packages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">

<arg name="colors" />
<arg name="severity" value="1" />
<arg name="parallel" value="80" />
<arg value="sp" />
<arg name="cache" value=".phpcs-cache" />
<arg name="extensions" value="php"/> <!-- Limit to PHP -->
<config name="text_domain" value="boxuk" />
<config name="testVersion" value="8.2-" /> <!-- Set the PHP version to test against --><config name="minimum_supported_wp_version" value="6.4" />
<config name="minimum_supported_wp_version" value="6.4" /> <!-- Set the minimum supported WordPress version -->

<!-- Output Progress and Colors -->
<arg value="sp"/>
<arg name="colors"/>

<config name="minimum_supported_wp_version" value="6.4" />
<config name="prefixes" value="" />
<config name="text_domain" value="boxuk" />

<!-- Scan Packages -->
<file>./packages/</file>

<exclude-pattern>/vendor</exclude-pattern>
Expand All @@ -27,15 +25,21 @@
<exclude-pattern>/packages/akismet</exclude-pattern>
<exclude-pattern>/packages/hello.php</exclude-pattern>

<rule ref="WordPress-VIP-Go">
<!-- Remove this so we can use PSR-4 autoloading -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>
<rule ref="WordPress-Docs" />
<rule ref="WordPress-Extra">
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found" />
<!-- Exclude dependencies -->
<exclude-pattern>*/mu-plugins/wp-feature-flags*</exclude-pattern>
<exclude-pattern>*/mu-plugins/wp-editor-tools*</exclude-pattern>
<exclude-pattern>wp-content/plugins*</exclude-pattern>

<!-- Let PHPCS know our custom capabilities. -->
<rule ref="WordPress.WP.Capabilities">
<properties>
<property name="custom_capabilities" type="array">
<!-- <element value="custom_capability" /> -->
</property>
</properties>
</rule>
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
<rule ref="Generic.Files.EndFileNewline" />

<!-- Follow BoxUK Coding Standards -->
<rule ref="WordPress-Box" />

</ruleset>
Loading