Skip to content

Commit 17796f2

Browse files
authored
chore: add bc-check to CI (#1016)
1 parent c69b069 commit 17796f2

File tree

5 files changed

+2900
-2
lines changed

5 files changed

+2900
-2
lines changed

.github/workflows/bc-check.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Backward Compatibility Check"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "*.x"
7+
paths:
8+
- .github/workflows/bc-check.yml
9+
- src/**
10+
push:
11+
branches:
12+
- "*.x"
13+
paths:
14+
- .github/workflows/bc-check.yml
15+
- src/**
16+
17+
jobs:
18+
roave_bc_check:
19+
name: "Roave BC Check"
20+
runs-on: "ubuntu-22.04"
21+
steps:
22+
- uses: "actions/checkout@v5"
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Install dependencies
27+
uses: ramsey/composer-install@v2
28+
with:
29+
composer-options: --prefer-dist
30+
31+
- name: Install PHP with extensions.
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: "8.4"
35+
36+
- name: Install roave/backward-compatibility-check.
37+
run: composer bin bc-check require roave/backward-compatibility-check
38+
39+
- name: Run roave/backward-compatibility-check.
40+
run: bin/tools/bc-check/vendor/roave/backward-compatibility-check/bin/roave-backward-compatibility-check --install-development-dependencies

.github/workflows/test-rector-rules.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ jobs:
3131

3232
- name: Install Rector & PHPStan
3333
run: |
34-
composer update phpunit/phpunit:^11 brianium/paratest -W
35-
3634
composer bin phpstan install
3735
composer bin rector install
3836
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<roave-bc-check
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="vendor/roave/backward-compatibility-check/resources/schema.xsd">
5+
<baseline>
6+
<ignored-regex>#\[BC\] SKIPPED: Roave\\BetterReflection\\Reflection\\ReflectionClass "Rector\\Rector\\AbstractRector" could not be found in the located source#</ignored-regex>
7+
<ignored-regex>#\[BC\] SKIPPED: Roave\\BetterReflection\\Reflection\\ReflectionClass "Psalm\\Plugin\\PluginEntryPointInterface" could not be found in the located source#</ignored-regex>
8+
<ignored-regex>#\[BC\] SKIPPED: Roave\\BetterReflection\\Reflection\\ReflectionClass "Psalm\\Plugin\\EventHandler\\AfterMethodCallAnalysisInterface" could not be found in the located source#</ignored-regex>
9+
</baseline>
10+
</roave-bc-check>

bin/tools/bc-check/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"roave/backward-compatibility-check": "^8.15"
4+
}
5+
}

0 commit comments

Comments
 (0)