Skip to content

Commit 39de3e6

Browse files
[Imported] AC-1059: Move PHPCompatibility rules from Magento tests (#122)
* AC-1059: Move PHPCompatibility rules from Magento tests
1 parent 6c6c082 commit 39de3e6

File tree

3 files changed

+86
-18
lines changed

3 files changed

+86
-18
lines changed

Magento2/ruleset.xml

+5
Original file line numberDiff line numberDiff line change
@@ -741,4 +741,9 @@
741741
<rule ref="Internal.NoCodeFound">
742742
<severity>0</severity>
743743
</rule>
744+
<rule ref="PHPCompatibility">
745+
<exclude name="PHPCompatibility.Miscellaneous.RemovedAlternativePHPTags.MaybeASPOpenTagFound" />
746+
<!-- Check for cross-version support for stated PHP version and higher. -->
747+
<config name="testVersion" value="7.4-"/>
748+
</rule>
744749
</ruleset>

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
"version": "15",
1010
"require": {
1111
"php": ">=7.3",
12-
"squizlabs/php_codesniffer": "^3.6",
1312
"webonyx/graphql-php": "^14.9",
1413
"ext-simplexml": "*",
15-
"ext-dom": "*"
14+
"ext-dom": "*",
15+
"phpcompatibility/php-compatibility": "^9.3",
16+
"squizlabs/php_codesniffer": "^3.6"
1617
},
1718
"require-dev": {
1819
"phpunit/phpunit": "^9.5.8"
@@ -32,7 +33,7 @@
3233
}
3334
},
3435
"scripts": {
35-
"post-install-cmd": "vendor/bin/phpcs --config-set installed_paths ../../..",
36-
"post-update-cmd": "vendor/bin/phpcs --config-set installed_paths ../../.."
36+
"post-install-cmd": "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility",
37+
"post-update-cmd": "vendor/bin/phpcs --config-set installed_paths ../../..,../../phpcompatibility/php-compatibility/PHPCompatibility"
3738
}
3839
}

composer.lock

+76-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)