diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30cdec47..4cbf1664 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,3 +71,29 @@ jobs: - uses: codecov/test-results-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} + + check_bc: + name: Check for BC breaks + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - uses: shivammathur/setup-php@v2 + with: + php-version: "8.5" + + - name: "Install roave/backward-compatibility-check" + # Installing in a standalone directory to avoid any dependency conflicts / changes. + # There is a docker action, but it appears to be outdated compared to php releases and doesn't appear to support + # pinning to a major release. + run: | + mkdir bc-check + cd bc-check + composer require --no-interaction roave/backward-compatibility-check:^8.17 + + - name: "Check for BC breaks" + run: | + bc-check/vendor/bin/roave-backward-compatibility-check \ + --format=github-actions