All Projects â†’ Roave â†’ Backwardcompatibilitycheck

Roave / Backwardcompatibilitycheck

Licence: mit
🆎 Tool to compare two revisions of a class API to check for BC breaks

Programming Languages

reflection
70 projects

Projects that are alternatives of or similar to Backwardcompatibilitycheck

Phpstan Symfony
Symfony extension for PHPStan
Stars: ✭ 360 (-18.18%)
Mutual labels:  static-analysis
Credo
A static code analysis tool for the Elixir language with a focus on code consistency and teaching.
Stars: ✭ 4,144 (+841.82%)
Mutual labels:  static-analysis
Saferwall
A hackable malware sandbox for the 21st Century
Stars: ✭ 419 (-4.77%)
Mutual labels:  static-analysis
Grype
A vulnerability scanner for container images and filesystems
Stars: ✭ 362 (-17.73%)
Mutual labels:  static-analysis
Engine
Droidefense: Advance Android Malware Analysis Framework
Stars: ✭ 386 (-12.27%)
Mutual labels:  static-analysis
Huskyci
Performing security tests inside your CI
Stars: ✭ 398 (-9.55%)
Mutual labels:  static-analysis
Detekt
Static code analysis for Kotlin
Stars: ✭ 4,169 (+847.5%)
Mutual labels:  static-analysis
Phpmnd
PHP Magic Number Detector
Stars: ✭ 431 (-2.05%)
Mutual labels:  static-analysis
Applicationinspector
A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.
Stars: ✭ 3,873 (+780.23%)
Mutual labels:  static-analysis
Sqlvet
Go fearless SQL. Sqlvet performs static analysis on raw SQL queries in your Go code base.
Stars: ✭ 410 (-6.82%)
Mutual labels:  static-analysis
Dss
📄 Documented Style Sheets Parser
Stars: ✭ 375 (-14.77%)
Mutual labels:  static-analysis
Go Tools
Staticcheck - The advanced Go linter
Stars: ✭ 4,317 (+881.14%)
Mutual labels:  static-analysis
Go Ruleguard
Define and run pattern-based custom linting rules.
Stars: ✭ 402 (-8.64%)
Mutual labels:  static-analysis
Wssat
WEB SERVICE SECURITY ASSESSMENT TOOL
Stars: ✭ 360 (-18.18%)
Mutual labels:  static-analysis
Prealloc
prealloc is a Go static analysis tool to find slice declarations that could potentially be preallocated.
Stars: ✭ 419 (-4.77%)
Mutual labels:  static-analysis
Clang Tools Extra
Mirror kept for legacy. Moved to https://github.com/llvm/llvm-project
Stars: ✭ 358 (-18.64%)
Mutual labels:  static-analysis
Wala
T.J. Watson Libraries for Analysis
Stars: ✭ 395 (-10.23%)
Mutual labels:  static-analysis
Gosec
Golang security checker
Stars: ✭ 5,694 (+1194.09%)
Mutual labels:  static-analysis
Psalm
A static analysis tool for finding errors in PHP applications
Stars: ✭ 4,523 (+927.95%)
Mutual labels:  static-analysis
Binee
Binee: binary emulation environment
Stars: ✭ 408 (-7.27%)
Mutual labels:  static-analysis

Roave Backward Compatibility Check

Mutation testing badge Type Coverage 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
  • 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

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.

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:

jobs:
  roave-backwards-compatibility-check:
    name: Roave Backwards Compatibility Check
      runs-on: ubuntu-latest
      steps:
        - uses: actions/[email protected]
          with:
            fetch-depth: 0
        - name: "Install PHP"
          uses: shivammathur/[email protected]
          with:
            coverage: "none"
            php-version: "7.4" # https://github.com/Roave/BackwardCompatibilityCheck/issues/283
        - name: "Install dependencies"
          run: "composer install --no-interaction"
        - name: "Check for BC breaks"
          run: "vendor/bin/roave-backward-compatibility-check"

Nyholm Github Action

Tobias Nyholm also offers a simple GitHub action that you can use in your Github pipeline. We recommend this for most cases as it is simple to set up:

.github/workflows/main.yml

on: [push]
name: Test
jobs:
  roave-backwards-compatibility-check:
    name: Roave Backwards Compatibility Check
      runs-on: ubuntu-latest
      steps:
        - uses: actions/[email protected]
          with:
            fetch-depth: 0
        - name: "Check for BC breaks"
          uses: docker://nyholm/roave-bc-check-ga

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].