@@ -5,7 +5,7 @@ rules for use primarily with the [SquareOne](https://github.com/moderntribe/squa
5
5
6
6
## Requirements
7
7
8
- - PHP7.4+
8
+ - PHP ^8.0
9
9
10
10
## Install
11
11
@@ -34,40 +34,45 @@ And `require-dev`:
34
34
35
35
# # Project ruleset
36
36
37
+ > Ensure you' re running PHP 8.0 locally!
38
+
37
39
To use this ruleset, create a `phpcs.xml.dist` in the root of the project and add the following content:
38
40
39
41
```xml
40
42
<?xml version="1.0"?>
41
43
<ruleset>
42
- < arg name=" basepath" value=" ." />
43
- < arg name=" extensions" value=" php" />
44
- < arg name=" severity" value=" 4" />
45
- < arg name=" tab-width" value=" 4" />
46
- < arg name=" parallel" value=" 80" />
47
- < arg name=" colors" />
48
-
49
- < ! -- Update to the PHP version your production/local docker container runs on -->
50
- < config name=" testVersion" value=" 7.4" />
51
- < ! -- php -r ' echo PHP_VERSION_ID;' -->
52
- < config name=" php_version" value=" 70407" />
53
-
54
- < ! -- Ignore warnings, show progress of the run and show sniff names -->
55
- < arg value=" nps" />
56
-
57
- < ! -- Directories to be checked -->
58
- < file> ./wp-content/plugins/core< /file>
59
- < file> ./wp-content/themes/core< /file>
60
- < file> ./wp-content/mu-plugins< /file>
61
-
62
- < ! -- Exclude files -->
63
- < exclude-pattern> * -config.php< /exclude-pattern>
64
- < exclude-pattern> * vendor/< /exclude-pattern>
65
- < exclude-pattern> * tests/* < /exclude-pattern>
66
- < exclude-pattern> * .twig< /exclude-pattern>
67
- < exclude-pattern> * webpack/< /exclude-pattern>
68
-
69
- < ! -- Include the Modern Tribe coding standard -->
70
- < rule ref=" ModernTribe" />
44
+ <arg name="basepath" value="." />
45
+ <arg name="extensions" value="php" />
46
+ <arg name="severity" value="4" />
47
+ <arg name="tab-width" value="4" />
48
+ <arg name="parallel" value="80" />
49
+ <arg name="colors" />
50
+
51
+ <!-- Update to the PHP version your production/local docker container runs on -->
52
+ <config name="testVersion" value="8.0" />
53
+ <!-- php -r ' echo PHP_VERSION_ID; ' -->
54
+ <config name="php_version" value="80022" />
55
+
56
+ <!-- Fix WordPress' s terrible typing breaking PHPCS -->
57
+ < config name=" minimum_supported_wp_version" value=" 5.6.0" />
58
+
59
+ < ! -- Ignore warnings, show progress of the run and show sniff names -->
60
+ < arg value=" nps" />
61
+
62
+ < ! -- Directories to be checked -->
63
+ < file> ./wp-content/plugins/core< /file>
64
+ < file> ./wp-content/themes/core< /file>
65
+ < file> ./wp-content/mu-plugins< /file>
66
+
67
+ < ! -- Exclude files -->
68
+ < exclude-pattern> * -config.php< /exclude-pattern>
69
+ < exclude-pattern> * vendor/< /exclude-pattern>
70
+ < exclude-pattern> * tests/* < /exclude-pattern>
71
+ < exclude-pattern> * .twig< /exclude-pattern>
72
+ < exclude-pattern> * webpack/< /exclude-pattern>
73
+
74
+ < ! -- Include the Modern Tribe coding standard -->
75
+ < rule ref=" ModernTribe" />
71
76
< /ruleset>
72
77
```
73
78
0 commit comments