{"id":27899493,"url":"https://github.com/roave/backwardcompatibilitycheck","last_synced_at":"2026-02-09T13:04:44.567Z","repository":{"id":37382232,"uuid":"108544542","full_name":"Roave/BackwardCompatibilityCheck","owner":"Roave","description":":ab: Tool to compare two revisions of a class API to check for BC breaks","archived":false,"fork":false,"pushed_at":"2025-05-11T11:04:08.000Z","size":3074,"stargazers_count":584,"open_issues_count":39,"forks_count":59,"subscribers_count":10,"default_branch":"8.14.x","last_synced_at":"2025-05-12T22:39:16.494Z","etag":null,"topics":["backward-compatibility","bc","reflection","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Roave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-27T12:40:27.000Z","updated_at":"2025-04-03T09:52:58.000Z","dependencies_parsed_at":"2024-02-08T20:28:47.442Z","dependency_job_id":"686f712e-049c-48f5-812a-b38090fb4904","html_url":"https://github.com/Roave/BackwardCompatibilityCheck","commit_stats":{"total_commits":994,"total_committers":37,"mean_commits":"26.864864864864863","dds":0.5472837022132797,"last_synced_commit":"e9fa426c56cbd7082d6b604d26a5cea2bac8f9ef"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBackwardCompatibilityCheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBackwardCompatibilityCheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBackwardCompatibilityCheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Roave%2FBackwardCompatibilityCheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Roave","download_url":"https://codeload.github.com/Roave/BackwardCompatibilityCheck/tar.gz/refs/heads/8.14.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044261,"owners_count":22005117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backward-compatibility","bc","reflection","static-analysis"],"created_at":"2025-05-05T19:34:04.508Z","updated_at":"2026-02-09T13:04:44.404Z","avatar_url":"https://github.com/Roave.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roave Backward Compatibility Check\n\n[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)\n\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FRoave%2FBackwardCompatibilityCheck%2F7.1.x)](https://dashboard.stryker-mutator.io/reports/github.com/Roave/BackwardCompatibilityCheck/7.1.x)\n[![Type Coverage](https://shepherd.dev/github/Roave/BackwardCompatibilityCheck/coverage.svg)](https://shepherd.dev/github/Roave/BackwardCompatibilityCheck)\n[![Latest Stable Version](https://poser.pugx.org/roave/backward-compatibility-check/v/stable)](https://packagist.org/packages/roave/backward-compatibility-check)\n[![License](https://poser.pugx.org/roave/backward-compatibility-check/license)](https://packagist.org/packages/roave/backward-compatibility-check)\n\nA tool that can be used to verify BC breaks between two versions\nof a PHP library.\n\n## Pre-requisites/assumptions\n\n* Your project uses `git`\n* Your project uses `composer.json` to define its dependencies\n* All source paths are covered by an `\"autoload\"` section in `composer.json`\n* 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.\n\n## Installation\n\n```bash\ncomposer require --dev roave/backward-compatibility-check\n```\n\n### Install with Docker\n\nYou can also use Docker to run `roave-backward-compatibility-check`:\n\n```bash\ndocker run --rm -v `pwd`:/app nyholm/roave-bc-check\n```\n\n## Usage\n\n### Adding to a continuous integration pipeline\n\nThe typical intended usage is to just add `roave-backward-compatibility-check`\nto your CI build:\n\n```bash\nvendor/bin/roave-backward-compatibility-check\n```\n\nThis will automatically detect the last minor version tagged, and\ncompare the API against the current `HEAD`. If any BC breaks are found,\nthe tool returns a non-zero status, which on most CI systems will cause\nthe build to fail.\n\n*NOTE:* detecting the base version only works if you have git tags in\nthe SemVer-compliant `x.y.z` format, such as `1.2.3`.\n\n*NOTE:* since this tool relies on tags, you need to make sure tags are fetched\nas part of your CI pipeline. For example in a GitHub action, note the use of\n[`fetch-depth: 0`](https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches):\n\n```yaml\njobs:\n  roave-backwards-compatibility-check:\n    name: Roave Backwards Compatibility Check\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - name: \"Install PHP\"\n        uses: shivammathur/setup-php@v2\n        with:\n          php-version: \"8.0\"\n      - name: \"Install dependencies\"\n        run: \"composer install\"\n      - name: \"Check for BC breaks\"\n        run: \"vendor/bin/roave-backward-compatibility-check\"\n```\n\n#### Nyholm Github Action\n\nTobias Nyholm also offers [a simple GitHub action](https://github.com/Nyholm/roave-bc-check-docker)\nthat you can use in your Github pipeline. We recommend this for most cases as\nit is simple to set up:\n\n`.github/workflows/main.yml`:\n\n```yaml\non: [push]\nname: Test\njobs:\n  roave-backwards-compatibility-check:\n    name: Roave Backwards Compatibility Check\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n      - name: \"Check for BC breaks\"\n        uses: docker://nyholm/roave-bc-check-ga\n```\n\n### Running manually\n\nTo generate additional documentation for changelogs:\n\n```bash\nvendor/bin/roave-backward-compatibility-check --format=markdown \u003e results.md\n```\n\n### GitHub Actions\n\nWhen running in GitHub Actions, it is endorsed to use the `--format=github-actions` output format:\n\n```bash\nvendor/bin/roave-backward-compatibility-check --format=github-actions\n```\n\n### Documentation\n\nIf you need further guidance:\n\n```bash\nvendor/bin/roave-backward-compatibility-check --help\n```\n\n## Configuration\n\nThe file `.roave-backward-compatibility-check.xml` is read from the current working directory (when it exists) and sets configuration for the command.\n\nIt's expected to be an XML file that follows our [schema](resources/schema.xsd):\n\n**Example:**\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\" ?\u003e\n\u003croave-bc-check\n    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n    xsi:noNamespaceSchemaLocation=\"vendor/roave/backward-compatibility-check/resources/schema.xsd\"\u003e\n    \u003cbaseline\u003e\n        \u003cignored-regex\u003e#\\[BC\\] CHANGED: The parameter \\$a of of TestArtifact\\\\TheClass\\#method\\(\\)#\u003c/ignored-regex\u003e\n        \u003cignored-regex\u003e#\\[BC\\] CHANGED: The parameter \\$b of of TestArtifact\\\\TheClass\\#method2\\(\\)#\u003c/ignored-regex\u003e\n    \u003c/baseline\u003e\n\u003c/roave-bc-check\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froave%2Fbackwardcompatibilitycheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froave%2Fbackwardcompatibilitycheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froave%2Fbackwardcompatibilitycheck/lists"}