{"id":37233622,"url":"https://github.com/mrm-commerce/magento-coding-standard-phpcs","last_synced_at":"2026-01-15T03:54:59.529Z","repository":{"id":49332176,"uuid":"345123065","full_name":"mrm-commerce/magento-coding-standard-phpcs","owner":"mrm-commerce","description":"MRM Commerce PHP Code Sniffer Coding Standard designed for Magento 2 applications","archived":false,"fork":false,"pushed_at":"2025-01-14T14:04:01.000Z","size":45,"stargazers_count":46,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-11-02T04:09:59.413Z","etag":null,"topics":["adobe-commerce","magento2","php","phpcs-standard"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrm-commerce.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-06T15:11:45.000Z","updated_at":"2025-01-14T13:54:10.000Z","dependencies_parsed_at":"2025-01-14T14:30:20.036Z","dependency_job_id":"b140494c-06c4-455d-88ef-8bca7d58e30e","html_url":"https://github.com/mrm-commerce/magento-coding-standard-phpcs","commit_stats":{"total_commits":29,"total_committers":1,"mean_commits":29.0,"dds":0.0,"last_synced_commit":"0493db2f59411f01f83cf92f662b04a4d3a11cca"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/mrm-commerce/magento-coding-standard-phpcs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrm-commerce%2Fmagento-coding-standard-phpcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrm-commerce%2Fmagento-coding-standard-phpcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrm-commerce%2Fmagento-coding-standard-phpcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrm-commerce%2Fmagento-coding-standard-phpcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrm-commerce","download_url":"https://codeload.github.com/mrm-commerce/magento-coding-standard-phpcs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrm-commerce%2Fmagento-coding-standard-phpcs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe-commerce","magento2","php","phpcs-standard"],"created_at":"2026-01-15T03:54:59.027Z","updated_at":"2026-01-15T03:54:59.521Z","avatar_url":"https://github.com/mrm-commerce.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MRM Commerce Magento 2 Coding Standard\n\n## MrmCommerceMagento2CodingStandard Ruleset Description\nMrmCommerceMagento2CodingStandard is the core ruleset of this coding standard. It consists of rules from several other \ncoding standards like:\n- The Magento 2 Coding Standard - the official one, all rules from it are automatically included here\n- PSR-12 - set of rules from the PHP Standards Recommendation #12 which expanded and replaced the PSR-2 coding\n  style guide\n- PHP Compatibility Coding Standard - for checking the code for incompatibilities with the selected PHP version\n- Security Audit Coding Standard - for issues related with security like possible SQL injections or insecure functions\n  usage\n- Slevomat Coding Standard - advanced and configurable coding standard providing a lot of functional, cleaning\n  and formatting sniffs that aim to make the code more consistent, safer and easier to read and maintain\nThe ruleset is designed to prevent phpcbf (PHP Code Beautifier and Fixer) from automatic fixes to reported errors and\nwarnings that may make your code to stop working. This means that you can use phpcbf to perform bulk fixes of the code\nin your custom modules instead of fixing every single issue manually. Just remember to always check the result before \ncommitting or merging it.\n\n## Installation instructions\n1. Ensure that other dependencies of your project don't conflict with \n   dependencies - e.g. if your project requires `\"dealerdirect/phpcodesniffer-composer-installer\": \"^0.5\"`, \n   you can remove it (`composer remove dealerdirect/phpcodesniffer-composer-installer` or a direct removal from \n   `composer.json`) as this package will install a newer version\n2. Run the following command: `composer require mrm-commerce/magento-coding-standard-phpcs --dev --with-dependencies`\n3. You should see the package and its dependencies being installed with the following information at the \n   end of the output:\n   ```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```\n4. If you see the `Failed to set PHP CodeSniffer installed_paths Config` error instead of the output above or you do not\n   see any output related to phpcs at all, you can run the following commands manually from your Magento root directory:\n   ```\n   cd vendor/squizlabs/php_codesniffer/\n   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\n   ```\n\n## Usage\nOnce the package is installed, you can use it to check your code using the following command:\n```\nphp vendor/bin/phpcs --standard=vendor/mrm-commerce/magento-coding-standard-phpcs/MrmCommerceMagento2CodingStandard/ruleset.xml vendor/your-vendor/\n```\nAs an optional parameter you can include `--runtime-set testVersion X.Y` (e.g. `--runtime-set testVersion 7.4`) to\nspecify the PHP version the check should be run against in order to get the most of the PHP Compatibility Coding \nStandard:\n```\nphp vendor/bin/phpcs --runtime-set testVersion 7.4 --standard=vendor/mrm-commerce/magento-coding-standard-phpcs/MrmCommerceMagento2CodingStandard/ruleset.xml vendor/your-vendor/\n```\n\n## FAQ\n### PHPCS suggests changes that are not compatible with the PHP version I'm using on my project\nEnsure that you are running PHPCS using the same PHP version that's used in your project.\nFor example, if a remote server hosting your Magento website runs PHP 7.3, you should not use 7.4 locally.\nSome sniffs will detect your PHP version and will react accordingly. Be aware that the PHP version that you defined\nin project settings will be ignored and the actual PHP version you run your project on will be used.\n\n### PHPCBF automatically adds syntax that's not compatible with my PHP version\nEnsure that you are running PHPCBF/PHPCS using the same PHP version that's used in your project. Some sniffs will detect your PHP version and will react accordingly. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrm-commerce%2Fmagento-coding-standard-phpcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrm-commerce%2Fmagento-coding-standard-phpcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrm-commerce%2Fmagento-coding-standard-phpcs/lists"}