Skip to content

fix(ci): upgrade Psalm and the coding standard to run on PHP 8.5 - #41

Merged
vitormattos merged 1 commit into
mainfrom
fix/support-php-8-5-in-static-analysis
Nov 14, 2026
Merged

vitormattos merged 1 commit into
mainfrom
fix/support-php-8-5-in-static-analysis

Conversation

@YvesCesar

Copy link
Copy Markdown
Member

The static-psalm-analysis and php-cs jobs run on the newest PHP version the app supports, which nextcloud-version-matrix now resolves to PHP 8.5. Both tools pinned in vendor-bin fail there:

  • Psalm 5.26.1 crashes with $value must be a scalar while reflecting the RoundingMode enum added in PHP 8.4. 5.26.1 is the last 5.x release.
  • php-cs-fixer 3.65 refuses to run on PHP above 8.3.

Changes:

  • vendor-bin/psalm: Psalm ^6.20, which supports PHP 8.1 to 8.5. Its platform goes from 8.1 to 8.1.31, the lowest 8.1 patch release Psalm 6 accepts; phpVersion in psalm.xml stays at 8.1.
  • Add #[\Override] to the four methods Psalm 6 flags with MissingOverrideAttribute, as LibreSign does, and drop the UndefinedDocblockClass suppression that is no longer triggered.
  • vendor-bin/coding-standard: nextcloud/coding-standard ^1.4, which brings php-cs-fixer 3.95 with PHP 8.5 support.

The workflows themselves are untouched, so the template sync does not overwrite this.

Verified locally on PHP 8.5.12 with nextcloud/ocp:dev-stable35, the same setup as CI: composer run psalm and composer run cs:check (without PHP_CS_FIXER_IGNORE_ENV) both pass.

Signed-off-by: YvesCesar <yvesamorim73@gmail.com>
@vitormattos
vitormattos merged commit e5da4cb into main Nov 14, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants