Skip to content
🆎 Tool to compare two revisions of a class API to check for BC breaks
Branch: master
Clone or download
Ocramius Merge pull request #120 from Roave/feature/experimental-psr-based-sou…
…rce-locators

Usage of roave/better-reflection composer source-locators for major performance improvements
Latest commit 3af8bc4 Apr 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Update to doctrine/cs v5 Apr 22, 2019
src Applying `thecodingmachine/safe` rules to all the codebase Apr 23, 2019
test Applying `thecodingmachine/safe` rules to all the codebase Apr 23, 2019
.gitignore #99 ignoring non-dist versions of automation test tools Aug 21, 2018
.travis.yml Verifying that no mutants are passing under the radar in CI Aug 23, 2018
LICENSE Avoid yearly updates on LICENSE Apr 29, 2018
README.md Added docks how to use Github actions and docker Feb 3, 2019
box.json.dist Build PHAR using BOX, deploy tags to GitHub releases Jun 29, 2018
build-phar.sh Build PHAR using BOX, deploy tags to GitHub releases Jun 29, 2018
composer.json Adding myself to project maintainers - for the lulz Apr 23, 2019
composer.lock Bumping phpstan-related dependencies to latest stable release Apr 23, 2019
infection.json.dist
phpcs.xml.dist Disabled unused private elements detection Aug 22, 2018
phpstan.neon.dist Added `thecodingmachine/safe` and related PHPStan rules Apr 23, 2019
phpunit.xml.dist
psalm.xml Added `vimeo/psalm` to the build, since we otherwise have no static a… May 26, 2018

README.md

Roave Backward Compatibility Check

Build Status Scrutinizer Code Quality Latest Stable Version License

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

Pre-requisites/assumptions

  • Your project uses git
  • Your project uses composer.json to define its dependencies

Installation

composer require --dev roave/backward-compatibility-check

Install with Docker

You can also use Docker to run roave-backward-compatibility-check:

docker run --rm -v `pwd`:/app nyholm/roave-bc-check

Usage

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.

Github action

You can use it as a Github Action like this:

.github/main.workflow

workflow "Main" {
  on = "push"
  resolves = ["Roave BC Check"]
}

action "Roave BC Check" {
  uses = "docker://nyholm/roave-bc-check-ga"
  secrets = ["GITHUB_TOKEN"]
  args = ""
}

Running manually

To generate additional documentation for changelogs:

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

Documentation

If you need further guidance:

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

Configuration

There are currently no configuration options available.

You can’t perform that action at this time.