Skip to content

[6.x] Raise PHPStan to level 7 - #19945

Draft
riasvdv wants to merge 6 commits into
6.xfrom
chore/phpstan-stricter-level
Draft

riasvdv wants to merge 6 commits into
6.xfrom
chore/phpstan-stricter-level

Conversation

@riasvdv

@riasvdv riasvdv commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Description

Raise core PHPStan from level 6 to level 7 and resolve the 1,902 reported diagnostics without adding suppressions. Type element queries according to hydrated or array results, correct shared contracts and array shapes, and add inference for collection lists, nullable array entries, and JSON encoding flags.

Move the shared activity timeline payload into a readonly data class while preserving its serialized format. Update adapter contracts to remain compatible with the stricter core types.

Fix defects exposed by the analysis, including numeric previews using XOR instead of exponentiation or passing fractional bounds to random_int(), and eager-loading maps discarding entries with overlapping numeric keys.

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/ui — open Storybook

No changed components detected in this Storybook.

resources/js — open Storybook

No changed components detected in this Storybook.

@riasvdv
riasvdv marked this pull request as draft October 13, 2026 13:45
@riasvdv

riasvdv commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Keeping in draft until some of our largest PRs are merged

@riasvdv
riasvdv force-pushed the chore/phpstan-stricter-level branch from dc939f0 to 3eb3fe8 Compare October 15, 2026 12:02

This branch has not been deployed

No deployments
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.

1 participant