Skip to content

chore: upgrade to PHP 8.5 - #349

Open
kayjoosten wants to merge 7 commits into
mainfrom
chore/php85-docker-composer-npm-update
Open

chore: upgrade to PHP 8.5#349
kayjoosten wants to merge 7 commits into
mainfrom
chore/php85-docker-composer-npm-update

Conversation

@kayjoosten

Copy link
Copy Markdown

Closes #344

Bumps Docker base images, Composer dependencies, and npm dependencies to PHP 8.5. Verified against the real CI Docker image, not just local host PHP.

Comment thread ci/qa/phpstan-baseline.neon Outdated
path: ../../src/OpenConext/EngineBlockApiClient/Service/AttributeReleasePolicyService.php

-
message: '#^PHPDoc tag @SuppressWarnings has invalid value \(\(PHPMD\.CyclomaticComplexity\) Build and mapping logic causes complexity\)\: Unexpected token "\.CyclomaticComplexity\)", expected ''\)'' at offset 160 on line 4$#'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was new in the PR, not pre-existing. PHPStan 2 started parsing the unquoted @SuppressWarnings(PHPMD...) annotations as invalid PHPDoc, so the baseline entry was masking a fixable issue. I quoted the PHPMD rule names in the source annotations, regenerated the baseline, and this suppression dropped out.

Comment thread ci/qa/phpstan-baseline.neon Outdated
path: ../../src/OpenConext/Profile/Value/EntityType.php

-
message: '#^PHPDoc tag @SuppressWarnings has invalid value \(\(PHPMD\.ShortMethodName\)\)\: Unexpected token "\.ShortMethodName\)", expected ''\)'' at offset 161 on line 6$#'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check rest of baseline

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the rest of the newly added baseline as well. I removed the avoidable additions I could fix safely in this PR: the invalid PHPMD PHPDoc parse-error suppressions, an unused test trait, and a handful of narrow/nullability/test typing issues. The remaining new entries are broader PHPStan 2.x findings on existing mixed/generics/deprecation hotspots (not PHP 8.5 runtime regressions), so I kept those in the baseline for this upgrade PR.

Comment thread component_info
@@ -1,6 +1,6 @@
PHP_VERSION=82
PHP_VERSION=85
SYMFONY_VERSION=6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SF 7 out of scope? Do we have separate ticket?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Symfony 7 is out of scope here. This PR keeps the app on Symfony 6.4 (symfony/* constraints and extra.symfony.require are still 6.4.*); component_info also still reports SYMFONY_VERSION=6. I created a follow-up ticket for the major bump: #351.

Comment thread README.md

## Requirements
- PHP 8.2
- PHP 8.5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check changelog or upgrade.md?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the documentation trail here: README now points readers to CHANGELOG.md for upgrade notes, and CHANGELOG.md now mentions the PHP 8.5 / Docker / Composer / npm refresh included in this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kayjoosten

Copy link
Copy Markdown
Author

Follow-up pushed in 17d698f. Summary: fixed the two reviewer-highlighted phpstan baseline entries by addressing the underlying source annotations, refreshed the baseline, scanned the remaining new suppressions and removed the safe/avoidable ones, clarified that Symfony 7 is out of scope for this PR, created follow-up issue #351 for that upgrade, and added CHANGELOG/README notes for the PHP 8.5 + Docker/Composer/npm refresh.

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.

Upgrade to PHP 8.5 and apply Rector cleanup

2 participants