Skip to content

Commit 242745c

Browse files
authored
refactor: split phpstan-baseline into smaller files (#9299)
* refactor: split phpstan-baseline into smaller files * Checkout base branch to resolve codeigniter4/framework * Fix rector changes
1 parent f0536a1 commit 242745c

File tree

90 files changed

+15839
-18083
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+15839
-18083
lines changed

.github/workflows/reusable-coveralls.yml

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ jobs:
1313
runs-on: ubuntu-22.04
1414

1515
steps:
16+
- name: Checkout base branch for PR
17+
if: github.event_name == 'pull_request'
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.base_ref }}
21+
1622
- name: Checkout
1723
uses: actions/checkout@v4
1824

.github/workflows/reusable-phpunit-test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ jobs:
148148
sudo apt-get install -y gsfonts libmagickwand-dev imagemagick
149149
sudo apt-get install --fix-broken
150150
151+
- name: Checkout base branch for PR
152+
if: github.event_name == 'pull_request'
153+
uses: actions/checkout@v4
154+
with:
155+
ref: ${{ github.base_ref }}
156+
151157
- name: Checkout
152158
uses: actions/checkout@v4
153159

.github/workflows/reusable-serviceless-phpunit-test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ jobs:
6060
sudo apt-get install -y imagemagick
6161
sudo apt-get install --fix-broken
6262
63+
- name: Checkout base branch for PR
64+
if: github.event_name == 'pull_request'
65+
uses: actions/checkout@v4
66+
with:
67+
ref: ${{ github.base_ref }}
68+
6369
- name: Checkout
6470
uses: actions/checkout@v4
6571

.github/workflows/test-autoreview.yml

+6
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ jobs:
3535
name: Check normalized composer.json
3636
runs-on: ubuntu-latest
3737
steps:
38+
- name: Checkout base branch for PR
39+
if: github.event_name == 'pull_request'
40+
uses: actions/checkout@v4
41+
with:
42+
ref: ${{ github.base_ref }}
43+
3844
- name: Checkout
3945
uses: actions/checkout@v4
4046

.github/workflows/test-coding-standards.yml

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ jobs:
3232
- '8.3'
3333

3434
steps:
35+
- name: Checkout base branch for PR
36+
if: github.event_name == 'pull_request'
37+
uses: actions/checkout@v4
38+
with:
39+
ref: ${{ github.base_ref }}
40+
3541
- name: Checkout
3642
uses: actions/checkout@v4
3743

.github/workflows/test-deptrac.yml

+6
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
name: Architectural Inspection
3737
runs-on: ubuntu-22.04
3838
steps:
39+
- name: Checkout base branch for PR
40+
if: github.event_name == 'pull_request'
41+
uses: actions/checkout@v4
42+
with:
43+
ref: ${{ github.base_ref }}
44+
3945
- name: Checkout
4046
uses: actions/checkout@v4
4147

.github/workflows/test-phpstan.yml

+6
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
strategy:
4646
fail-fast: false
4747
steps:
48+
- name: Checkout base branch for PR
49+
if: github.event_name == 'pull_request'
50+
uses: actions/checkout@v4
51+
with:
52+
ref: ${{ github.base_ref }}
53+
4854
- name: Checkout
4955
uses: actions/checkout@v4
5056

.github/workflows/test-psalm.yml

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ jobs:
2727
if: (! contains(github.event.head_commit.message, '[ci skip]'))
2828

2929
steps:
30+
- name: Checkout base branch for PR
31+
if: github.event_name == 'pull_request'
32+
uses: actions/checkout@v4
33+
with:
34+
ref: ${{ github.base_ref }}
35+
3036
- name: Checkout
3137
uses: actions/checkout@v4
3238

.github/workflows/test-rector.yml

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
matrix:
4848
php-versions: ['8.1', '8.3']
4949
steps:
50+
- name: Checkout base branch for PR
51+
if: github.event_name == 'pull_request'
52+
uses: actions/checkout@v4
53+
with:
54+
ref: ${{ github.base_ref }}
55+
5056
- name: Checkout
5157
uses: actions/checkout@v4
5258

composer.json

+11-5
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@
1717
"psr/log": "^3.0"
1818
},
1919
"require-dev": {
20-
"codeigniter/phpstan-codeigniter": "^1.4",
20+
"codeigniter/phpstan-codeigniter": "^1.5",
2121
"fakerphp/faker": "^1.9",
2222
"kint-php/kint": "^5.0.4",
2323
"mikey179/vfsstream": "^1.6",
2424
"nexusphp/tachycardia": "^2.0",
2525
"phpstan/extension-installer": "^1.4",
26-
"phpstan/phpstan": "^1.11",
27-
"phpstan/phpstan-strict-rules": "^1.6",
26+
"phpstan/phpstan": "^2.0",
27+
"phpstan/phpstan-strict-rules": "^2.0",
2828
"phpunit/phpcov": "^9.0.2 || ^10.0",
2929
"phpunit/phpunit": "^10.5.16 || ^11.2",
3030
"predis/predis": "^1.1 || ^2.0",
31-
"rector/rector": "1.2.10"
31+
"rector/rector": "2.0.0-rc3",
32+
"shipmonk/phpstan-baseline-per-identifier": "^2.0"
3233
},
3334
"replace": {
3435
"codeigniter4/framework": "self.version"
@@ -110,7 +111,12 @@
110111
"utils/vendor/bin/php-cs-fixer fix --ansi --verbose --diff"
111112
],
112113
"metrics": "utils/vendor/bin/phpmetrics --config=phpmetrics.json",
113-
"phpstan:baseline": "vendor/bin/phpstan analyse --ansi --generate-baseline=phpstan-baseline.php",
114+
"phpstan:baseline": [
115+
"bash -c \"rm -rf utils/phpstan-baseline/*.neon\"",
116+
"bash -c \"touch utils/phpstan-baseline/loader.neon\"",
117+
"phpstan analyse --ansi --generate-baseline=utils/phpstan-baseline/loader.neon",
118+
"split-phpstan-baseline utils/phpstan-baseline/loader.neon"
119+
],
114120
"phpstan:check": "vendor/bin/phpstan analyse --verbose --ansi",
115121
"sa": "@analyze",
116122
"style": "@cs-fix",

0 commit comments

Comments
 (0)