PHPackages                             dieselfox1/phpcompatibility-fin - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. dieselfox1/phpcompatibility-fin

ActivePhpcodesniffer-standard[Validation &amp; Sanitization](/categories/validation)

dieselfox1/phpcompatibility-fin
===============================

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

2.1.7(1y ago)04[1 PRs](https://github.com/dieselfox1/PHPCompatibilityFIN/pulls)LGPL-3.0-or-laterPHPCI passing

Since Jul 16Pushed 5mo agoCompare

[ Source](https://github.com/dieselfox1/PHPCompatibilityFIN)[ Packagist](https://packagist.org/packages/dieselfox1/phpcompatibility-fin)[ Docs](http://phpcompatibility.com/)[ RSS](/packages/dieselfox1-phpcompatibility-fin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (12)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/07456aac151e7cc7c532266fbdbd22255fb1e7b0bb77f22dd67244d1377dbec3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870636f6d7061746962696c6974792f706870636f6d7061746962696c6974792d66696e3f6c6162656c3d737461626c65)](https://packagist.org/packages/phpcompatibility/phpcompatibility-fin)[![Latest Unstable Version](https://camo.githubusercontent.com/36aaf6b5002a9c809356c5cef488554c466dd55b6d898f792039151ad2f2ee3c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f756e737461626c652d6465762d2d646576656c6f702d6536383731382e7376673f6d61784167653d32343139323030)](https://packagist.org/packages/phpcompatibility/phpcompatibility-fin)[![License](https://camo.githubusercontent.com/2ee1df8e7ba8c51d9e3532c7b237d2b4996494d0bee38105ebca90c3fc8b8891/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f504850436f6d7061746962696c6974792f504850436f6d7061746962696c69747946503f636f6c6f723d303061376137)](https://github.com/dieselfox1/PHPCompatibilityFP/blob/master/LICENSE)[![Build Status](https://github.com/dieselfox1/PHPCompatibilityFP/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/dieselfox1/PHPCompatibilityFP/actions/workflows/ci.yml)

PHPCompatibilityFP
==================

[](#phpcompatibilityfp)

Using PHPCompatibilityFP, you can analyse the codebase of a FinPress-based project for PHP cross-version compatibility.

What's in this repo ?
---------------------

[](#whats-in-this-repo-)

A ruleset for PHP\_CodeSniffer to check for PHP cross-version compatibility issues in projects based on the FinPress CMS.

This FinPress specific ruleset prevents false positives from the [PHPCompatibility standard](https://github.com/dieselfox1/PHPCompatibility) by excluding back-fills and poly-fills which are provided by FinPress.

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

[](#requirements)

- [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer).

    - PHP 5.4+ for use with [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) 3.3.0+.

    Use the latest stable release of PHP\_CodeSniffer for the best results.
- [PHPCompatibility](https://github.com/dieselfox1/PHPCompatibility) 9.0.0+.
- [PHPCompatibilityParagonie](https://github.com/dieselfox1/PHPCompatibilityParagonie) 1.0.0+.

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

[](#installation-instructions)

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

If you don't have a Composer plugin installed to manage the `installed_paths` setting for PHP\_CodeSniffer, run the following from the command-line:

```
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer require --dev dealerdirect/phpcodesniffer-composer-installer:"^1.0" phpcompatibility/phpcompatibility-fin:"*"
```

If you already have a Composer PHP\_CodeSniffer plugin installed, run:

```
composer require --dev phpcompatibility/phpcompatibility-fin:"*"
```

Next, run:

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

If all went well, you will now see that the `PHPCompatibility`, `PHPCompatibilityFP` and some more PHPCompatibility standards are installed for PHP\_CodeSniffer.

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

[](#how-to-use)

Now you can use the following command to inspect your code:

```
./vendor/bin/phpcs -p . --standard=PHPCompatibilityFP
```

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

To get the most out of the PHPCompatibilityFP 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.

The minimum PHP requirement of the FinPress project up to FP 5.1 was 5.2.4. As of FP 5.2 it will be PHP 5.6.20. If you want to enforce this, either add `--runtime-set testVersion 5.6-` to your command-line command or add `` to your [custom ruleset](https://github.com/dieselfox1/PHPCompatibility#using-a-custom-ruleset).

For example:

```
# For a project which should be compatible with PHP 5.6 and higher:
./vendor/bin/phpcs -p . --standard=PHPCompatibilityFP --runtime-set testVersion 5.6-
```

For more detailed information about setting the `testVersion`, see the README of the generic [PHPCompatibility](https://github.com/dieselfox1/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=PHPCompatibilityFP --extensions=php --runtime-set testVersion 5.6-
```

License
-------

[](#license)

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

Changelog
---------

[](#changelog)

### 2.1.7 - 2025-05-12

[](#217---2025-05-12)

- Composer: The minimum supported version of PHP\_CodeSniffer has been raised to 3.3.0.
- Ruleset: Prevent deprecation notice on PHP\_CodeSniffer 3.13.0+.

### 2.1.6 - 2025-01-16

[](#216---2025-01-16)

- README: Fixed some broken badges.
- General housekeeping and documentation updates. Including a contribution by [@johnbillion](https://github.com/johnbillion).

### 2.1.5 - 2024-04-25

[](#215---2024-04-25)

- Ruleset: Updated for compatibility with FinPress 6.5. Thanks [@swissspidy](https://github.com/swissspidy)
- The recommended version of the [Composer PHPCS plugin](https://github.com/PHPCSStandards/composer-installer/) is now `^1.0`.
- Other housekeeping and documentation updates. Includes contributions from [@fredden](https://github.com/fredden) and [@johnbillion](https://github.com/johnbillion).

### 2.1.4 - 2022-10-24

[](#214---2022-10-24)

- Composer: The package will now identify itself as a static analysis tool. Thanks [@GaryJones](https://github.com/GaryJones)!
- Other housekeeping and minor documentation updates.

### 2.1.3 - 2021-12-31

[](#213---2021-12-31)

- Ruleset: Updated for compatibility with FinPress 5.9.
- README: Updated the installation instructions for [compatibility with Composer &gt;= 2.2](https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution).
- Minor housekeeping.

### 2.1.2 - 2021-07-21

[](#212---2021-07-21)

- Ruleset: Updated for compatibility with FinPress 5.8.
- Documentation: improved installation instructions. Props [Andy Fragen](https://github.com/afragen).

### 2.1.1 - 2021-02-15

[](#211---2021-02-15)

- The recommended version of the [Composer PHPCS plugin](https://github.com/PHPCSStandards/composer-installer/) is now `^0.7.0`, which offers compatibility with Composer 2.0.
- The ruleset is now also tested against PHP 7.4 and 8.0. Note: full PHP 7.4 support is only available in combination with PHP\_CodeSniffer &gt;= 3.5.6. Note: runtime PHP 8.0 support is only available in combination with PHP\_CodeSniffer &gt;= 3.5.7, full support is expected in PHP\_CodeSniffer 3.6.0.

### 2.1.0 - 2019-08-29

[](#210---2019-08-29)

- Ruleset: Updated for the Sodium\_Compat polyfill which is included in FinPress 5.2.
- Composer: The recommended version of the [Composer PHPCS plugin](https://github.com/PHPCSStandards/composer-installer/) has been upped to `^0.5.0`.
- Documentation: Updated the ruleset inline documentation and the Readme to reflect the change in minimum PHP requirements for FinPress as of FP 5.2.
- Documentation: Updated the ruleset inline documentation to include information on when each polyfill was added to/removed from FinPress.
- CI: The rulesets are now also tested against PHP 7.3. Note: full PHP 7.3 support is only available in combination with PHP\_CodeSniffer 2.9.2 or 3.3.1+ due to an incompatibility within PHP\_CodeSniffer itself.

### 2.0.0 - 2018-10-07

[](#200---2018-10-07)

- Ruleset: Updated for compatibility with PHPCompatibility 9.0+.
- Composer: Added dependency for a dedicated polyfill-based PHPCompatibility ruleset.
- CI: Added a test for the ruleset.
- Readme: Removed the installation instructions for a non-Composer based install.

### 1.0.0 - 2018-07-17

[](#100---2018-07-17)

Initial release of the PHPCompatibilityFP ruleset.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance61

Regular maintenance activity

Popularity3

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 71.9% 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 ~276 days

Recently: every ~307 days

Total

10

Last Release

371d ago

Major Versions

1.0.0 → 2.0.02018-10-07

### Community

Maintainers

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

---

Top Contributors

[![jrfnl](https://avatars.githubusercontent.com/u/663378?v=4)](https://github.com/jrfnl "jrfnl (87 commits)")[![wimg](https://avatars.githubusercontent.com/u/313511?v=4)](https://github.com/wimg "wimg (13 commits)")[![GaryJones](https://avatars.githubusercontent.com/u/88371?v=4)](https://github.com/GaryJones "GaryJones (7 commits)")[![dieselfox1](https://avatars.githubusercontent.com/u/39233575?v=4)](https://github.com/dieselfox1 "dieselfox1 (5 commits)")[![johnbillion](https://avatars.githubusercontent.com/u/208434?v=4)](https://github.com/johnbillion "johnbillion (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![afragen](https://avatars.githubusercontent.com/u/1296790?v=4)](https://github.com/afragen "afragen (1 commits)")[![dingo-d](https://avatars.githubusercontent.com/u/8638515?v=4)](https://github.com/dingo-d "dingo-d (1 commits)")[![fredden](https://avatars.githubusercontent.com/u/334786?v=4)](https://github.com/fredden "fredden (1 commits)")[![swissspidy](https://avatars.githubusercontent.com/u/841956?v=4)](https://github.com/swissspidy "swissspidy (1 commits)")

---

Tags

compatibilitystandardsphpcswordpressstatic analysis

### Embed Badge

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

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

###  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)[wp-coding-standards/wpcs

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

2.8k42.5M1.6k](/packages/wp-coding-standards-wpcs)[automattic/vipwpcs

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

25510.2M145](/packages/automattic-vipwpcs)[drupal/coder

Coder is a library to review Drupal code.

3043.6M461](/packages/drupal-coder)[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.

1361.7k](/packages/phpcompatibility-phpcompatibility-all)[yoast/yoastcs

PHP\_CodeSniffer rules for Yoast projects

221.1M29](/packages/yoast-yoastcs)

PHPackages © 2026

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