Skip to content

Commit 36a162b

Browse files
committed
Add PHPCompatibility to phpcs check
1 parent 68f0366 commit 36a162b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"require-dev": {
3535
"httpwg/structured-field-tests": "*@dev",
3636
"paragonie/constant_time_encoding": "^3.0.0",
37+
"phpcompatibility/php-compatibility": "^10@dev",
3738
"phpmd/phpmd": "^2.15",
3839
"phpstan/phpstan": "^2.1",
3940
"phpstan/phpstan-phpunit": "^2.0",

phpcs.xml.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@
2929
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"/>
3030
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/>
3131
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
32+
33+
<config name="testVersion" value="8.1-"/>
34+
<rule ref="PHPCompatibility"/>
3235
</ruleset>

phpmd.ruleset.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
<ruleset name="PHPMD Ruleset"
33
xmlns="http://pmd.sf.net/ruleset/1.0.0"
44
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5-
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
6-
http://pmd.sf.net/ruleset_xml_schema.xsd"
7-
xsi:noNamespaceSchemaLocation="
8-
http://pmd.sf.net/ruleset_xml_schema.xsd">
5+
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
6+
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
97
<description>PHPMD Ruleset</description>
108

119
<rule ref="rulesets/codesize.xml">
1210
<exclude name="CyclomaticComplexity" />
1311
<exclude name="ExcessiveClassComplexity" />
12+
<exclude name="TooManyPublicMethods" />
1413
</rule>
1514
<rule ref="rulesets/unusedcode.xml"/>
1615
</ruleset>

0 commit comments

Comments
 (0)