From f3dae0a0c5148ab2255fb40f1b6e59351ebae0ed Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Wed, 7 Jan 2026 15:45:24 -0500 Subject: [PATCH 1/6] chore: use min php version for psalm Signed-off-by: Elizabeth Danzberger --- .github/workflows/psalm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 0b15f3adb8..d0084123c7 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -35,10 +35,10 @@ jobs: - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml - - name: Set up php${{ steps.versions.outputs.php-available }} + - name: Set up php${{ steps.versions.outputs.php-min }} uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: - php-version: ${{ steps.versions.outputs.php-available }} + php-version: ${{ steps.versions.outputs.php-min }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none ini-file: development From 902a24330897f316a28e4fa6c7465768ef8e3f22 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Wed, 7 Jan 2026 16:51:24 -0500 Subject: [PATCH 2/6] chore: run static analysis for each php version Signed-off-by: Elizabeth Danzberger --- .github/workflows/psalm.yml | 42 ++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index d0084123c7..eb5a25bbb1 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -18,27 +18,43 @@ permissions: contents: read jobs: - static-analysis: - runs-on: ubuntu-latest - - name: static-psalm-analysis + matrix: + runs-on: ubuntu-latest-low + outputs: + php-versions: ${{ steps.versions.outputs.php-versions }} steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: persist-credentials: false - - name: Get php version + - name: Get php version matrix id: versions uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 - name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml - - name: Set up php${{ steps.versions.outputs.php-min }} + static-analysis: + runs-on: ubuntu-latest + needs: matrix + strategy: + matrix: + fail-fast: false + php-versions: ${{ fromJson(needs.matrix.outputs.php-versions) }} + + name: static-psalm-analysis + + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: Set up php${{ matrix.php-versions }} uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 with: - php-version: ${{ steps.versions.outputs.php-min }} + php-version: ${{ matrix.php-versions }} extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none ini-file: development @@ -57,3 +73,15 @@ jobs: - name: Run coding standards check run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github + + summary: + runs-on: ubuntu-latest-low + needs: static-analysis + + if: always() + + name: static-analysis-summary + + steps: + - name: Summary status + run: if ${{ needs.static-analysis.result != 'success' && needs.static-analysis.result != 'skipped' }}; then exit 1; fi \ No newline at end of file From 24a46c659ad78a352c063aa81dbfa603163da13f Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Wed, 7 Jan 2026 16:58:26 -0500 Subject: [PATCH 3/6] fix: invalid workflow file Signed-off-by: Elizabeth Danzberger --- .github/workflows/psalm.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index eb5a25bbb1..6989b6c628 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -39,8 +39,8 @@ jobs: runs-on: ubuntu-latest needs: matrix strategy: + fail-fast: false matrix: - fail-fast: false php-versions: ${{ fromJson(needs.matrix.outputs.php-versions) }} name: static-psalm-analysis @@ -74,14 +74,14 @@ jobs: - name: Run coding standards check run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github - summary: - runs-on: ubuntu-latest-low - needs: static-analysis + summary: + runs-on: ubuntu-latest-low + needs: static-analysis - if: always() + if: always() - name: static-analysis-summary + name: static-analysis-summary - steps: - - name: Summary status - run: if ${{ needs.static-analysis.result != 'success' && needs.static-analysis.result != 'skipped' }}; then exit 1; fi \ No newline at end of file + steps: + - name: Summary status + run: if ${{ needs.static-analysis.result != 'success' && needs.static-analysis.result != 'skipped' }}; then exit 1; fi From b8d3a8c9a32f0c2871a7fa22efcadea5d5591e6d Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Wed, 7 Jan 2026 17:10:15 -0500 Subject: [PATCH 4/6] fix: update ocp version output Signed-off-by: Elizabeth Danzberger --- .github/workflows/psalm.yml | 72 +++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 39 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 6989b6c628..d75a9a4ddf 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -22,6 +22,7 @@ jobs: runs-on: ubuntu-latest-low outputs: php-versions: ${{ steps.versions.outputs.php-versions }} + branches-max: ${{ steps.versions.outputs.branches-max }} steps: - name: Checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 @@ -43,45 +44,38 @@ jobs: matrix: php-versions: ${{ fromJson(needs.matrix.outputs.php-versions) }} - name: static-psalm-analysis + name: psalm-static-analysis steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - persist-credentials: false - - - name: Set up php${{ matrix.php-versions }} - uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 - with: - php-version: ${{ matrix.php-versions }} - extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - coverage: none - ini-file: development - # Temporary workaround for missing pcntl_* in PHP 8.3 - ini-values: disable_functions= - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Install dependencies - run: | - composer remove nextcloud/ocp --dev - composer i + - name: Testing some things + run: echo ${{ needs.matrix.outputs.branches-max }} + + # steps: + # - name: Checkout + # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + # with: + # persist-credentials: false + # + # - name: Set up php${{ matrix.php-versions }} + # uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 + # with: + # php-version: ${{ matrix.php-versions }} + # extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite + # coverage: none + # ini-file: development + # # Temporary workaround for missing pcntl_* in PHP 8.3 + # ini-values: disable_functions= + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # + # - name: Install dependencies + # run: | + # composer remove nextcloud/ocp --dev + # composer i + # + # - name: Install nextcloud/ocp + # run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches-max }} --ignore-platform-reqs --with-dependencies + # + # - name: Run coding standards check + # run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github - - name: Install nextcloud/ocp - run: composer require --dev nextcloud/ocp:dev-${{ steps.versions.outputs.branches-max }} --ignore-platform-reqs --with-dependencies - - - name: Run coding standards check - run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github - - summary: - runs-on: ubuntu-latest-low - needs: static-analysis - - if: always() - - name: static-analysis-summary - - steps: - - name: Summary status - run: if ${{ needs.static-analysis.result != 'success' && needs.static-analysis.result != 'skipped' }}; then exit 1; fi From 61b9de7e74a2ed35dd21b30922a950b5619856d3 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Fri, 9 Jan 2026 16:05:21 -0500 Subject: [PATCH 5/6] fix: rename job Signed-off-by: Elizabeth Danzberger --- .github/workflows/psalm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index d75a9a4ddf..a7c2b61df3 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -44,7 +44,7 @@ jobs: matrix: php-versions: ${{ fromJson(needs.matrix.outputs.php-versions) }} - name: psalm-static-analysis + name: Psalm Static Analysis (PHP ${{ matrix.php-versions }}) steps: - name: Testing some things From 6764d1cd922214d427e4d692075b82e24a110c76 Mon Sep 17 00:00:00 2001 From: Elizabeth Danzberger Date: Fri, 9 Jan 2026 16:07:55 -0500 Subject: [PATCH 6/6] fix: do not add ocp branch to matrix Signed-off-by: Elizabeth Danzberger --- .github/workflows/psalm.yml | 56 +++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index a7c2b61df3..931c1bb2b7 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -47,35 +47,31 @@ jobs: name: Psalm Static Analysis (PHP ${{ matrix.php-versions }}) steps: - - name: Testing some things - run: echo ${{ needs.matrix.outputs.branches-max }} + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + persist-credentials: false + + - name: Set up php${{ matrix.php-versions }} + uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 + with: + php-version: ${{ matrix.php-versions }} + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite + coverage: none + ini-file: development + # Temporary workaround for missing pcntl_* in PHP 8.3 + ini-values: disable_functions= + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install dependencies + run: | + composer remove nextcloud/ocp --dev + composer i + + - name: Install nextcloud/ocp + run: composer require --dev nextcloud/ocp:dev-${{ needs.matrix.outputs.branches-max }} --ignore-platform-reqs --with-dependencies - # steps: - # - name: Checkout - # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - # with: - # persist-credentials: false - # - # - name: Set up php${{ matrix.php-versions }} - # uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 - # with: - # php-version: ${{ matrix.php-versions }} - # extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite - # coverage: none - # ini-file: development - # # Temporary workaround for missing pcntl_* in PHP 8.3 - # ini-values: disable_functions= - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - # - name: Install dependencies - # run: | - # composer remove nextcloud/ocp --dev - # composer i - # - # - name: Install nextcloud/ocp - # run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches-max }} --ignore-platform-reqs --with-dependencies - # - # - name: Run coding standards check - # run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github + - name: Run coding standards check + run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github