Repository navigation
chore: analyse the PHP samples of the user guide with PHPStan - #10779
Open
paulbalandan wants to merge 4 commits into
Open
paulbalandan wants to merge 4 commits into
paulbalandan wants to merge 4 commits into
Conversation
michalsn
reviewed
Nov 18, 2026
paulbalandan
force-pushed
the
docs-samples-phpstan
branch
from
November 18, 2026 11:12
0761388 to
ef7e9c0
Compare
michalsn
approved these changes
Nov 18, 2026
paulbalandan
force-pushed
the
docs-samples-phpstan
branch
2 times, most recently
from
November 18, 2026 14:27
763a29c to
780f2c4
Compare
paulbalandan
force-pushed
the
docs-samples-phpstan
branch
from
November 18, 2026 14:31
780f2c4 to
8717258
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The PHP samples in the user guide are style-checked, but not for correctness. Some called methods or constants that do not exist, or had signatures that did not match the class they extend.
This adds
php admin/lint-docs-samples.php --phpstan, which analyses the samples with PHPStan using the root configuration (or--phpstan-config). Errors are reported against the page and line, with working editor links.baselinepart, the samples to skip and the errors ignored per sample, is written byphp admin/lint-docs-samples.php --generate-baseline.Checklist: