Skip to content

Commit

Permalink
merged workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Dec 13, 2024
1 parent 31ff920 commit 8fdc8e7
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 92 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@ on:

jobs:
phpcs:
name: ${{ matrix.rules.label }}
name: Validation
runs-on: [ubuntu-latest]

strategy:
matrix:
rules:
- label: Ecg
path: .phpcs.dist.ecg.xml
- label: PhpCompatibility
path: .phpcs.dist.php.xml

steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -42,4 +34,4 @@ jobs:
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*

- name: PHPCodeSniffer
run: php vendor/bin/phpcs -s -p --report=full --standard=${{ matrix.rules.path }}
run: php vendor/bin/phpcs -s -p --report=full --standard=.phpcs.dist.xml
76 changes: 0 additions & 76 deletions .phpcs.dist.php.xml

This file was deleted.

64 changes: 63 additions & 1 deletion .phpcs.dist.ecg.xml → .phpcs.dist.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<ruleset name="OpenMage ECG" namespace="OpenMage\CS\Standard">
<ruleset name="OpenMage" namespace="OpenMage\CS\Standard">
<file>api.php</file>
<file>cron.php</file>
<file>get.php</file>
Expand All @@ -12,6 +12,7 @@
<file>lib/Magento/</file>
<file>lib/Varien/</file>
<file>shell/</file>
<file>tests/unit/</file>

<exclude-pattern>*/core/Mage/*/data/*</exclude-pattern>
<exclude-pattern>*/core/Mage/*/sql/*</exclude-pattern>
Expand Down Expand Up @@ -143,4 +144,65 @@
<!-- should be reviewed -->
<exclude name="Squiz.PHP.Eval.Discouraged"/>
</rule>

<rule ref="PHPCompatibility" />
<rule ref="PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.MethodDoubleUnderscore">
<exclude-pattern>*/Varien/Object.php*</exclude-pattern>
<exclude-pattern>*/Varien/Data/Form/Abstract.php*</exclude-pattern>
<exclude-pattern>*/Varien/Db/Tree.php*</exclude-pattern>
<exclude-pattern>*/Varien/Directory/Collection.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_blowfishDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_mode_cbcDeprecatedRemoved">
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_mode_ecbDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Constants.RemovedConstants.mcrypt_randDeprecatedRemoved">
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_create_ivDeprecatedRemoved">
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.Extensions.RemovedExtensions.mcryptDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_enc_get_iv_sizeDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_enc_get_key_sizeDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_genericDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_generic_deinitDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_generic_initDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_module_closeDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mcrypt_module_openDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
<rule ref="PHPCompatibility.FunctionUse.RemovedFunctions.mdecrypt_genericDeprecatedRemoved">
<exclude-pattern>*/Magento/Crypt.php*</exclude-pattern>
<exclude-pattern>*/Varien/Crypt/Mcrypt.php*</exclude-pattern>
</rule>
</ruleset>
5 changes: 0 additions & 5 deletions .phpcs.xml

This file was deleted.

0 comments on commit 8fdc8e7

Please sign in to comment.