Skip to content
Merged
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
4 changes: 2 additions & 2 deletions MrmCommerceMagento2CodingStandard/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<ruleset name="MRM Commerce Magento 2 Coding Standard" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../squizlabs/php_codesniffer/phpcs.xsd">
<description>MRM Commerce Magento 2 Coding Standard</description>
<config name="installed_paths" value="../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../phpcompatibility/php-compatibility,../../slevomat/coding-standard"/>
<config name="installed_paths" value="../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../magento/php-compatibility-fork,../../slevomat/coding-standard"/>
<rule ref="../../../magento/magento-coding-standard/Magento2/ruleset.xml"/>
<rule ref="../../../phpcompatibility/php-compatibility/PHPCompatibility/ruleset.xml"/>
<rule ref="../../../magento/php-compatibility-fork/PHPCompatibility/ruleset.xml"/>
<rule ref="../../../squizlabs/php_codesniffer/src/Standards/PSR12/ruleset.xml"/>

<!-- Running some php-related rules on .xml files can have dire consequences -->
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ committing or merging it.
2. Run the following command: `composer require mrm-commerce/magento-coding-standard-phpcs --dev --with-dependencies`
3. You should see the package and its dependencies being installed with the following information at the
end of the output:
```PHP CodeSniffer Config installed_paths set to ../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../phpcompatibility/php-compatibility,../../slevomat/coding-standard```
```PHP CodeSniffer Config installed_paths set to ../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../magento/php-compatibility-fork,../../slevomat/coding-standard```
4. If you see the `Failed to set PHP CodeSniffer installed_paths Config` error instead of the output above or you do not
see any output related to phpcs at all, you can run the following commands manually from your Magento root directory:
```
cd vendor/squizlabs/php_codesniffer/
php ./bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../phpcompatibility/php-compatibility,../../slevomat/coding-standard
php ./bin/phpcs --config-set installed_paths ../../magento/magento-coding-standard,../../mrm-commerce/magento-coding-standard-phpcs,../../mrm-commerce/phpcs-security-audit,../../magento/php-compatibility-fork,../../slevomat/coding-standard
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"magento/magento-coding-standard": "*",
"mrm-commerce/phpcs-security-audit": "^3.0",
"slevomat/coding-standard": "8.1.0",
"phpcompatibility/php-compatibility": "9.3.5",
"magento/php-compatibility-fork": "*",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7"
},
"license": [
Expand Down