PHPackages                             phpcompatibility/phpcompatibility-all - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. phpcompatibility/phpcompatibility-all

ActivePhpcodesniffer-standard[PSR &amp; Standards](/categories/psr-standards)

phpcompatibility/phpcompatibility-all
=====================================

A set of rulesets for PHP\_CodeSniffer to check for PHP cross-version compatibility issues and opportunities to modernize code in PHP projects.

1.1.5(7mo ago)1361.7k—7.6%2LGPL-3.0-or-laterCI passing

Since Jul 17Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/PHPCompatibility/PHPCompatibilityAll)[ Packagist](https://packagist.org/packages/phpcompatibility/phpcompatibility-all)[ Docs](http://phpcompatibility.com/)[ GitHub Sponsors](https://github.com/PHPCompatibility)[ GitHub Sponsors](https://github.com/jrfnl)[ RSS](/packages/phpcompatibility-phpcompatibility-all/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (11)Used By (0)

PHPCompatibilityAll
===================

[](#phpcompatibilityall)

[![License](https://camo.githubusercontent.com/5cbdecc46a81c69ee45838ad786d36ac6d400b464d8cea1206b22460169f5504/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f504850436f6d7061746962696c6974792f504850436f6d7061746962696c697479416c6c3f636f6c6f723d303061376137)](https://github.com/PHPCompatibility/PHPCompatibilityAll/blob/master/LICENSE)[![Build Status](https://github.com/PHPCompatibility/PHPCompatibilityAll/actions/workflows/validate.yml/badge.svg?branch=master)](https://github.com/PHPCompatibility/PHPCompatibilityAll/actions/workflows/validate.yml)

Convenience package to install all the external PHP\_CodeSniffer rulesets which the [PHPCompatibility organisation](https://github.com/PHPCompatibility) maintains, in one go using Composer.

Funding
-------

[](#funding)

**This project needs funding.**

The project team has spend thousands of hours creating and maintaining the PHPCompatibility packages. This is unsustainable without funding.

If you use PHPCompatibility, please fund this work by setting up a monthly contribution to the [PHP\_CodeSniffer Open Collective](https://opencollective.com/php_codesniffer).

What's included in this package ?
---------------------------------

[](#whats-included-in-this-package-)

### Base ruleset

[](#base-ruleset)

- [![PHPCompatibility Current Version](https://camo.githubusercontent.com/b9612288d338ff99b533911378e384b24eb07963777ae7ae4a91955b7bfde01a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f7068702d636f6d7061746962696c6974793f6c6162656c3d737461626c65)](https://packagist.org/packages/phpcompatibility/php-compatibility) [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility) - External PHP\_CodeSniffer standard to check your codebase for PHP cross-version compatibility.

### Framework/CMS specific rulesets

[](#frameworkcms-specific-rulesets)

- [![PHPCompatibilityJoomla Current Version](https://camo.githubusercontent.com/2ae36350dc9d30ca510d152b7aa170f2366d0a5f0a7918026209c959b131073f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f706870636f6d7061746962696c6974792d6a6f6f6d6c613f6c6162656c3d737461626c65)](https://packagist.org/packages/PHPCompatibility/phpcompatibility-joomla) [PHPCompatibilityJoomla](https://github.com/PHPCompatibility/PHPCompatibilityJoomla) - PHPCompatibility ruleset specific for Joomla projects.
- [![PHPCompatibilityWP Current Version](https://camo.githubusercontent.com/843e052105e66ce96aa822440c13ceb2833ca7e242677af52c4b91badb7e6c36/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f706870636f6d7061746962696c6974792d77703f6c6162656c3d737461626c65)](https://packagist.org/packages/PHPCompatibility/phpcompatibility-wp) [PHPCompatibilityWP](https://github.com/PHPCompatibility/PHPCompatibilityWP) - PHPCompatibility ruleset specific for WordPress projects.

### Polyfill provider specific rulesets

[](#polyfill-provider-specific-rulesets)

- [![PHPCompatibilityPasswordCompat Current Version](https://camo.githubusercontent.com/16ecdb6ee0d45297ff63bf11ffbab580722889ccdcdff7896461270892e9187b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f706870636f6d7061746962696c6974792d70617373776f7264636f6d7061743f6c6162656c3d737461626c65)](https://packagist.org/packages/phpcompatibility/phpcompatibility-passwordcompat) [PHPCompatibilityPasswordCompat](https://github.com/PHPCompatibility/PHPCompatibilityPasswordCompat) - PHPCompatibility ruleset specific for projects which use @ircmaxell's [`password_compat`](https://github.com/ircmaxell/password_compat) polyfill library.
- [![PHPCompatibilityParagonie Current Version](https://camo.githubusercontent.com/3e18e4047ffedef0fb5cca47a2d71d298d452717afb0e159d2345a1172fec8d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f706870636f6d7061746962696c6974792d70617261676f6e69653f6c6162656c3d737461626c65)](https://packagist.org/packages/phpcompatibility/phpcompatibility-paragonie) [PHPCompatibilityParagonie](https://github.com/PHPCompatibility/PHPCompatibilityParagonie) - PHPCompatibility rulesets for projects using either the Paragonie [`random_compat`](https://github.com/paragonie/random_compat) or the Paragonie [`sodium_compat`](https://github.com/paragonie/sodium_compat) polyfill library, or both.
- [![PHPCompatibilitySymfony Current Version](https://camo.githubusercontent.com/585eaffd13017abecea2409d0ddf986e94f200038448605776ba4e9155524c6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f706870636f6d7061746962696c6974792d73796d666f6e793f6c6162656c3d737461626c65)](https://packagist.org/packages/phpcompatibility/phpcompatibility-symfony) [PHPCompatibilitySymfony](https://github.com/PHPCompatibility/PHPCompatibilitySymfony) - PHPCompatibility rulesets for projects using any of the [PHP polyfill libraries](https://github.com/symfony?utf8=?&q=polyfill) provided by the Symfony project. For more details about the available rulesets, please check out the [README of the PHPCompatibilitySymfony](https://github.com/PHPCompatibility/PHPCompatibilitySymfony/blob/master/README.md) repository.

Requirements
------------

[](#requirements)

- PHP &gt; 5.4
- [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) &gt; 3.13.3. Use the latest stable release of PHP\_CodeSniffer for the best results.
- [Composer](https://getcomposer.org/)

Installation instructions
-------------------------

[](#installation-instructions)

The only supported installation method is via [Composer](https://getcomposer.org/).

[Composer](https://getcomposer.org/) will automatically install the project dependencies and register the external rulesets with PHP\_CodeSniffer using the [Composer PHPCS plugin](https://github.com/PHPCSStandards/composer-installer/).

Run the following from the root of your project:

```
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev phpcompatibility/phpcompatibility-all:"^2.0@dev"
```

Next, run:

```
vendor/bin/phpcs -i
```

If all went well, you will now see that the `PHPCompatibility`, `PHPCompatibilityJoomla`, `PHPCompatibilityWP` and a number of polyfill related standards are installed for PHP\_CodeSniffer.

Upgrade instructions
--------------------

[](#upgrade-instructions)

To upgrade this package, run the following command:

```
composer update --dev phpcompatibility/phpcompatibility-all --with-dependencies
```

Tip

If you have a *root* requirement in your project for one of the packages used by this project, you may need to update with `--with-all-dependencies` instead.

How to use
----------

[](#how-to-use)

You can now use any of the following commands to inspect your code:

```
vendor/bin/phpcs -p . --standard=PHPCompatibility
vendor/bin/phpcs -p . --standard=PHPCompatibilityJoomla
vendor/bin/phpcs -p . --standard=PHPCompatibilityWP
vendor/bin/phpcs -p . --standard=PHPCompatibilityPasswordCompat
vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieRandomCompat
vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieSodiumCompat
vendor/bin/phpcs -p . --standard=PHPCompatibilitySymfonyPolyfillPHP54
vendor/bin/phpcs -p . --standard=PHPCompatibilitySymfonyPolyfillPHP73
...etc...

# You can also combine the standards if your project uses several:
./vendor/bin/phpcs -p . --standard=PHPCompatibilityPasswordCompat,PHPCompatibilitySymfonyPolyfillPHP70,PHPCompatibilityWP
```

By default, you will only receive notifications about deprecated and/or removed PHP features.

To get the most out of the PHPCompatibility standards, 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.

- You can run the checks for just one specific PHP version by adding `--runtime-set testVersion 5.5` to your command line command.
- You can also specify a range of PHP versions that your code needs to support. In this situation, compatibility issues that affect any of the PHP versions in that range will be reported: `--runtime-set testVersion 5.3-5.5`.
- Since PHPCompatibility 7.1.3, you can omit one part of the range if you want to support everything above or below a particular version, i.e. use `--runtime-set testVersion 7.0-` to run all the checks for PHP 7.0 and above.

For example:

```
# For a Joomla project which should be compatible with PHP 5.3 up to and including PHP 7.0:
vendor/bin/phpcs -p . --standard=PHPCompatibilityJoomla --runtime-set testVersion 5.3-7.0

# For a project using both the Paragonie Sodium Compat polyfill, as well as the Symfony
# PHP 7.1 polyfill and which should be compatible with PHP 5.4 and higher:
vendor/bin/phpcs -p . --standard=PHPCompatibilityParagonieSodiumCompat,PHPCompatibilitySymfonyPolyfillPHP71 --runtime-set testVersion 5.4-
```

For more detailed information, see the README of the main [PHPCompatibility](https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions) standard.

### Testing PHP files only

[](#testing-php-files-only)

By 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:

```
vendor/bin/phpcs -p . --standard=PHPCompatibilitySymfonyPolyfillPHP56 --extensions=php --runtime-set testVersion 5.3-
```

License
-------

[](#license)

All code within the PHPCompatibility organisation is released under the GNU Lesser General Public License (LGPL). For more information, visit .

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance78

Regular maintenance activity

Popularity38

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 78.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~379 days

Recently: every ~427 days

Total

8

Last Release

208d ago

Major Versions

1.1.5 → 2.0.0-alpha12025-10-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/c276f443673da81d365a16828d46818ea4e3136f7ce05491abcc70f43c82fa4c?d=identicon)[jrfnl](/maintainers/jrfnl)

![](https://www.gravatar.com/avatar/c1ef3caa2b7d98cb0f2d9bee0e50c47d9a4613ccbb7b8b618b070384e0585604?d=identicon)[wimg](/maintainers/wimg)

---

Top Contributors

[![jrfnl](https://avatars.githubusercontent.com/u/663378?v=4)](https://github.com/jrfnl "jrfnl (77 commits)")[![wimg](https://avatars.githubusercontent.com/u/313511?v=4)](https://github.com/wimg "wimg (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![fredden](https://avatars.githubusercontent.com/u/334786?v=4)](https://github.com/fredden "fredden (1 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (1 commits)")

---

Tags

phpphp-codesnifferphpcompatibilityphpcs-standardcompatibilitystandardsphpcssymfonywordpressstatic analysisparagoniepolyfillsjoomlapassword\_compat

### Embed Badge

![Health badge](/badges/phpcompatibility-phpcompatibility-all/health.svg)

```
[![Health](https://phpackages.com/badges/phpcompatibility-phpcompatibility-all/health.svg)](https://phpackages.com/packages/phpcompatibility-phpcompatibility-all)
```

###  Alternatives

[phpcompatibility/phpcompatibility-wp

A ruleset for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.

22130.6M587](/packages/phpcompatibility-phpcompatibility-wp)[automattic/vipwpcs

PHP\_CodeSniffer rules (sniffs) to enforce WordPress VIP minimum coding conventions

25510.2M145](/packages/automattic-vipwpcs)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)[wptrt/wpthemereview

PHP\_CodeSniffer rules (sniffs) to verify theme compliance with the rules for theme hosting on wordpress.org

217736.5k29](/packages/wptrt-wpthemereview)[phpcompatibility/phpcompatibility-paragonie

A set of rulesets for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.

1031.3M10](/packages/phpcompatibility-phpcompatibility-paragonie)[mayflower/mo4-coding-standard

PHP CodeSniffer ruleset implementing the MO4 coding standards extending the Symfony coding standards.

17508.3k5](/packages/mayflower-mo4-coding-standard)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
