PHPackages                             ondrejmirtes/backward-compatibility-check - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ondrejmirtes/backward-compatibility-check

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ondrejmirtes/backward-compatibility-check
=========================================

Tool to compare two revisions of a public API to check for BC breaks

7.3.0.1(3y ago)28.5k[8 PRs](https://github.com/ondrejmirtes/BackwardCompatibilityCheck/pulls)MITPHPPHP ~8.1.0 || ~8.2.0

Since May 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ondrejmirtes/BackwardCompatibilityCheck)[ Packagist](https://packagist.org/packages/ondrejmirtes/backward-compatibility-check)[ RSS](/packages/ondrejmirtes-backward-compatibility-check/feed)WikiDiscussions 7.3.x Synced 1mo ago

READMEChangelogDependencies (13)Versions (48)Used By (0)

Roave Backward Compatibility Check
==================================

[](#roave-backward-compatibility-check)

[![Mutation testing badge](https://camo.githubusercontent.com/64ca7e0fa310ee6ae51ecb4cc09f68ec7092563f7e99047b9b3493befc2242b7/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532466f6e6472656a6d69727465732532464261636b77617264436f6d7061746962696c697479436865636b2532466d6173746572)](https://dashboard.stryker-mutator.io/reports/github.com/ondrejmirtes/BackwardCompatibilityCheck/master)[![Latest Stable Version](https://camo.githubusercontent.com/ed339839248b93a317b4242fc0f6939a5a1019f5f7ee88c7ca03f8eca459b0cf/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6472656a6d69727465732f6261636b776172642d636f6d7061746962696c6974792d636865636b2f762f737461626c65)](https://packagist.org/packages/ondrejmirtes/backward-compatibility-check)[![License](https://camo.githubusercontent.com/73617762fd8f0a434f170a87111f957518503c8f7040511ea3eba1381dce76a5/68747470733a2f2f706f7365722e707567782e6f72672f6f6e6472656a6d69727465732f6261636b776172642d636f6d7061746962696c6974792d636865636b2f6c6963656e7365)](https://packagist.org/packages/ondrejmirtes/backward-compatibility-check)

A tool that can be used to verify BC breaks between two versions of a PHP library.

**This fork changes internal classes and methods interpretation according to [PHPStan backward compatibility promise](https://phpstan.org/developing-extensions/backward-compatibility-promise).**

Pre-requisites/assumptions
--------------------------

[](#pre-requisitesassumptions)

- Your project uses `git`
- Your project uses `composer.json` to define its dependencies
- All source paths are covered by an `"autoload"` section in `composer.json`
- Changes need to be committed to `git` to be covered. You can implement your own logic to extract sources and dependencies from a project though.

Installation
------------

[](#installation)

```
composer require --dev ondrejmirtes/backward-compatibility-check
```

Usage
-----

[](#usage)

### Adding to a continuous integration pipeline

[](#adding-to-a-continuous-integration-pipeline)

The typical intended usage is to just add `roave-backward-compatibility-check`to your CI build:

```
vendor/bin/roave-backward-compatibility-check
```

This will automatically detect the last minor version tagged, and compare the API against the current `HEAD`. If any BC breaks are found, the tool returns a non-zero status, which on most CI systems will cause the build to fail.

*NOTE:* detecting the base version only works if you have git tags in the SemVer-compliant `x.y.z` format, such as `1.2.3`.

*NOTE:* since this tool relies on tags, you need to make sure tags are fetched as part of your CI pipeline. For example in a GitHub action, note the use of [`fetch-depth: 0`](https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches):

```
jobs:
  roave-backwards-compatibility-check:
    name: Roave Backwards Compatibility Check
      runs-on: ubuntu-latest
      steps:
        - uses: actions/checkout@v2
          with:
            fetch-depth: 0
        - name: "Install PHP"
          uses: shivammathur/setup-php@v2
          with:
            php-version: "8.0"
        - name: "Install dependencies"
          run: "composer install"
        - name: "Check for BC breaks"
          run: "vendor/bin/roave-backward-compatibility-check"
```

### Running manually

[](#running-manually)

To generate additional documentation for changelogs:

```
vendor/bin/roave-backward-compatibility-check --format=markdown > results.md
```

### GitHub Actions

[](#github-actions)

When running in GitHub Actions, it is endorsed to use the `--format=github-actions` output format:

```
vendor/bin/roave-backward-compatibility-check --format=github-actions
```

### Documentation

[](#documentation)

If you need further guidance:

```
vendor/bin/roave-backward-compatibility-check --help
```

Configuration
-------------

[](#configuration)

There are currently no configuration options available.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~52 days

Recently: every ~35 days

Total

34

Last Release

1181d ago

Major Versions

2.1.0 → 3.0.02019-04-23

3.0.0 → 4.0.02019-07-17

4.4.0 → 5.0.02020-06-22

5.0.8 → 6.0.12022-01-03

5.0.9 → 7.1.0.12022-09-29

PHP version history (6 changes)1.0.0PHP ^7.2

4.0.0PHP ^7.3

5.0.0PHP ^7.4.7

5.0.1PHP ^8.0

6.0.1PHP ~8.0.0 || ~8.1.0

7.3.0PHP ~8.1.0 || ~8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/258cf2d2422f7e9ac5f7e1bb7a331f3fb717a11e51de7a3de2d6025507bd63cf?d=identicon)[ondrejmirtes](/maintainers/ondrejmirtes)

---

Top Contributors

[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (572 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (243 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (214 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (131 commits)")[![asgrim](https://avatars.githubusercontent.com/u/496145?v=4)](https://github.com/asgrim "asgrim (96 commits)")[![ondrejmirtes](https://avatars.githubusercontent.com/u/104888?v=4)](https://github.com/ondrejmirtes "ondrejmirtes (21 commits)")[![Jean85](https://avatars.githubusercontent.com/u/6729988?v=4)](https://github.com/Jean85 "Jean85 (13 commits)")[![azjezz](https://avatars.githubusercontent.com/u/29315886?v=4)](https://github.com/azjezz "azjezz (12 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (8 commits)")[![bendavies](https://avatars.githubusercontent.com/u/625392?v=4)](https://github.com/bendavies "bendavies (7 commits)")[![darenas31415](https://avatars.githubusercontent.com/u/16238028?v=4)](https://github.com/darenas31415 "darenas31415 (6 commits)")[![mad-briller](https://avatars.githubusercontent.com/u/28307684?v=4)](https://github.com/mad-briller "mad-briller (3 commits)")[![ntzm](https://avatars.githubusercontent.com/u/3888578?v=4)](https://github.com/ntzm "ntzm (3 commits)")[![tomasnorre](https://avatars.githubusercontent.com/u/1212481?v=4)](https://github.com/tomasnorre "tomasnorre (3 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (2 commits)")[![nikolaposa](https://avatars.githubusercontent.com/u/6012807?v=4)](https://github.com/nikolaposa "nikolaposa (2 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (2 commits)")[![Legion112](https://avatars.githubusercontent.com/u/20613430?v=4)](https://github.com/Legion112 "Legion112 (2 commits)")[![xepozz](https://avatars.githubusercontent.com/u/6815714?v=4)](https://github.com/xepozz "xepozz (1 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ondrejmirtes-backward-compatibility-check/health.svg)

```
[![Health](https://phpackages.com/badges/ondrejmirtes-backward-compatibility-check/health.svg)](https://phpackages.com/packages/ondrejmirtes-backward-compatibility-check)
```

###  Alternatives

[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[friendsofphp/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

1.7k3.3k](/packages/friendsofphp-pickle)

PHPackages © 2026

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