{"id":19932023,"url":"https://github.com/phpcompatibility/phpcompatibilitymagento","last_synced_at":"2025-05-03T11:30:53.054Z","repository":{"id":52946091,"uuid":"344616668","full_name":"PHPCompatibility/PHPCompatibilityMagento","owner":"PHPCompatibility","description":"PHPCompatibility ruleset for Magento projects ","archived":false,"fork":false,"pushed_at":"2024-09-09T17:21:25.000Z","size":39,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-09-09T21:35:42.755Z","etag":null,"topics":["magento2","php","php-codesniffer","phpcompatibility","phpcs-standard"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PHPCompatibility.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"open_collective":"php_codesniffer","github":["PHPCompatibility","jrfnl"]}},"created_at":"2021-03-04T21:39:17.000Z","updated_at":"2024-09-09T17:21:29.000Z","dependencies_parsed_at":"2024-09-09T21:00:03.506Z","dependency_job_id":null,"html_url":"https://github.com/PHPCompatibility/PHPCompatibilityMagento","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPCompatibility%2FPHPCompatibilityMagento","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPCompatibility%2FPHPCompatibilityMagento/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPCompatibility%2FPHPCompatibilityMagento/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PHPCompatibility%2FPHPCompatibilityMagento/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PHPCompatibility","download_url":"https://codeload.github.com/PHPCompatibility/PHPCompatibilityMagento/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224360233,"owners_count":17298319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["magento2","php","php-codesniffer","phpcompatibility","phpcs-standard"],"created_at":"2024-11-12T23:08:47.115Z","updated_at":"2025-05-03T11:30:53.046Z","avatar_url":"https://github.com/PHPCompatibility.png","language":"PHP","readme":"[![Latest Stable Version](https://img.shields.io/packagist/v/phpcompatibility/phpcompatibility-magento?label=stable)](https://packagist.org/packages/phpcompatibility/phpcompatibility-magento)\n[![Latest Unstable Version](https://img.shields.io/badge/unstable-dev--develop-e68718.svg?maxAge=2419200)](https://packagist.org/packages/phpcompatibility/phpcompatibility-magento)\n[![License](https://img.shields.io/github/license/PHPCompatibility/PHPCompatibilityMagento?color=00a7a7)](https://github.com/PHPCompatibility/PHPCompatibilityMagento/blob/main/LICENSE)\n[![Build Status](https://github.com/PHPCompatibility/PHPCompatibilityMagento/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/PHPCompatibility/PHPCompatibilityMagento/actions/workflows/ci.yml)\n\n# PHPCompatibilityMagento\n\nUsing PHPCompatibilityMagento, you can analyse the codebase of a Magento-based project for PHP cross-version compatibility.\n\n\n## What's in this repo ?\n\nA ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects based on the Magento CMS.\n\nThis Magento specific ruleset prevents false positives from the [PHPCompatibility standard](https://github.com/PHPCompatibility/PHPCompatibility) by excluding back-fills and poly-fills which are provided by Magento.\n\n\n## Requirements\n\n* [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer).\n    * PHP 5.3+ for use with [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) 2.3.0+.\n    * PHP 5.4+ for use with [PHP_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) 3.0.2+.\n\n    Use the latest stable release of PHP_CodeSniffer for the best results.\n    The minimum _recommended_ version of PHP_CodeSniffer is version 2.6.0.\n* [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility) 9.0.0+.\n* [PHPCompatibilityParagonie](https://github.com/PHPCompatibility/PHPCompatibilityParagonie) 1.0.0+.\n\n\n## Installation instructions\n\nThe only supported installation method is via [Composer](https://getcomposer.org/).\n\n[Composer](http://getcomposer.org/) will automatically install the project dependencies and register the external rulesets with PHP_CodeSniffer using the [Composer PHPCS plugin].\n\nRun the following from the root of your project:\n```bash\ncomposer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true\ncomposer require --dev dealerdirect/phpcodesniffer-composer-installer:\"^0.7\" phpcompatibility/phpcompatibility-magento:\"*\"\n```\n\nNext, run:\n```bash\nvendor/bin/phpcs -i\n```\nIf all went well, you will now see that the `PHPCompatibility`, `PHPCompatibilityMagento`  and some more PHPCompatibility standards are installed for PHP_CodeSniffer.\n\n\n## How to use\n\nNow you can use the following command to inspect your code:\n```bash\nvendor/bin/phpcs -p . --standard=PHPCompatibilityMagento\n```\n\nBy default, you will only receive notifications about deprecated and/or removed PHP features.\n\nTo get the most out of the PHPCompatibilityMagento standard, you should specify a `testVersion` to check against. That will enable the checks for both deprecated/removed PHP features as well as the detection of code using new PHP features.\n\nThe minimum PHP requirement of the Magento project at this time is PHP 7.3.0. If you want to enforce this, either add `--runtime-set testVersion 7.3-` to your command-line command or add `\u003cconfig name=\"testVersion\" value=\"7.3-\"/\u003e` to your [custom ruleset](https://github.com/PHPCompatibility/PHPCompatibility#using-a-custom-ruleset).\n\nFor example:\n```bash\n# For a project which should be compatible with PHP 7.3 and higher:\nvendor/bin/phpcs -p . --standard=PHPCompatibilityMagento --runtime-set testVersion 7.3-\n```\n\nFor more detailed information about setting the `testVersion`, see the README of the generic [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions) standard.\n\n\n### Testing PHP files only\n\nBy default PHP_CodeSniffer will analyse PHP, JavaScript and CSS files. As the PHPCompatibility sniffs only target PHP code, you can make the run slightly faster by telling PHP_CodeSniffer to only check PHP files, like so:\n```bash\nvendor/bin/phpcs -p . --standard=PHPCompatibilityMagento --extensions=php --runtime-set testVersion 7.3-\n```\n\n## License\n\nAll code within the PHPCompatibility organisation is released under the GNU Lesser General Public License (LGPL). For more information, visit https://www.gnu.org/copyleft/lesser.html\n\n\n## Changelog\n\n### Unreleased\n\n...\n\n[Composer PHPCS plugin]: https://github.com/PHPCSStandards/composer-installer\n","funding_links":["https://opencollective.com/php_codesniffer","https://github.com/sponsors/PHPCompatibility","https://github.com/sponsors/jrfnl"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpcompatibility%2Fphpcompatibilitymagento","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphpcompatibility%2Fphpcompatibilitymagento","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphpcompatibility%2Fphpcompatibilitymagento/lists"}