Skip to content

Commit 569fb28

Browse files
authored
Merge pull request #1234 from nextcloud/fix/php-scoper
Make ci green again
2 parents 31a84b0 + 43375f9 commit 569fb28

File tree

3 files changed

+38
-39
lines changed

3 files changed

+38
-39
lines changed

.github/workflows/psalm-matrix.yml

Lines changed: 16 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,27 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
jobs:
24-
matrix:
25-
runs-on: ubuntu-latest-low
26-
outputs:
27-
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }}
28-
steps:
29-
- name: Checkout app
30-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
31-
- name: Get version matrix
32-
id: versions
33-
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
34-
3524
static-analysis:
3625
runs-on: ubuntu-latest
37-
needs: matrix
38-
strategy:
39-
# do not stop on another job's failure
40-
fail-fast: false
41-
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }}
4226

43-
name: static-psalm-analysis ${{ matrix.ocp-version }}
27+
name: static-psalm-analysis
4428
steps:
4529
- name: Checkout
46-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
31+
with:
32+
persist-credentials: false
33+
34+
- name: Get php version
35+
id: versions
36+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
4737

48-
- name: Set up php${{ matrix.php-versions }}
38+
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
39+
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
40+
41+
- name: Set up php${{ steps.versions.outputs.php-available }}
4942
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
5043
with:
51-
php-version: ${{ matrix.php-versions }}
44+
php-version: ${{ steps.versions.outputs.php-available }}
5245
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
5346
coverage: none
5447
ini-file: development
@@ -60,21 +53,8 @@ jobs:
6053
composer remove nextcloud/ocp --dev
6154
composer i
6255
63-
64-
- name: Install dependencies
65-
run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies
56+
- name: Install nextcloud/ocp
57+
run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies
6658

6759
- name: Run coding standards check
68-
run: composer run psalm
69-
70-
summary:
71-
runs-on: ubuntu-latest-low
72-
needs: static-analysis
73-
74-
if: always()
75-
76-
name: static-psalm-analysis-summary
77-
78-
steps:
79-
- name: Summary status
80-
run: if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi
60+
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
xmlns="https://getpsalm.org/schema/config"
77
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
88
errorBaseline="psalm-baseline.xml"
9+
phpVersion="8.1"
910
>
1011
<stubs>
1112
<file name="tests/stub.phpstub" preloadClasses="true"/>
Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
2-
"require-dev": {
3-
"humbug/php-scoper": "^0.18.7"
2+
"require": {
3+
"humbug/php-scoper": "^0.18",
4+
"cweagans/composer-patches": "^1.7"
5+
},
6+
"config": {
7+
"platform": {
8+
"php": "8.1"
9+
},
10+
"allow-plugins": {
11+
"cweagans/composer-patches": true
12+
}
13+
},
14+
"extra": {
15+
"patches": {
16+
"thecodingmachine/safe": {
17+
"PHP 8.4 compatibility, patch 1": "https://patch-diff.githubusercontent.com/raw/thecodingmachine/safe/pull/464.patch",
18+
"PHP 8.4 compatibility, patch 2": "https://patch-diff.githubusercontent.com/raw/thecodingmachine/safe/pull/466.patch",
19+
"PHP 8.4 compatibility, patch 3": "https://github.com/blizzz/safe/commit/6eeee2a20ffb2be3456ae8615b227c78e1ca8a20.patch"
20+
}
21+
}
422
}
5-
}
23+
}

0 commit comments

Comments
 (0)