Update Error Docs#14850
Open
phpstan-bot wants to merge 1 commit into
phpstan:2.2.xphpstan/phpstan:2.2.xfrom
phpstan-bot:create-pull-request/patch-l22375cphpstan-bot/phpstan:create-pull-request/patch-l22375cCopy head branch name to clipboard
Open
Update Error Docs#14850phpstan-bot wants to merge 1 commit intophpstan:2.2.xphpstan/phpstan:2.2.xfrom phpstan-bot:create-pull-request/patch-l22375cphpstan-bot/phpstan:create-pull-request/patch-l22375cCopy head branch name to clipboard
phpstan-bot wants to merge 1 commit into
phpstan:2.2.xphpstan/phpstan:2.2.xfrom
phpstan-bot:create-pull-request/patch-l22375cphpstan-bot/phpstan:create-pull-request/patch-l22375cCopy head branch name to clipboard
Conversation
- AttributeRequiresPhpVersionRule gained a new error message
("Version requirement is incomplete.") and shifted source lines
in errorsIdentifiers.json
- Expanded the doc to cover all conditions reported by the
identifier: missing operator, deprecated bare syntax, incomplete
version, always-false constraints, and unparsable constraints
- Added a fix example for writing versions in full major.minor.patch form
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.
The latest
website/src/errorsIdentifiers.jsonupdate shifted the source locations for thephpunit.attributeRequiresPhpVersionidentifier (from 4 to 5 locations), reflecting a new error message added toAttributeRequiresPhpVersionRulein phpstan-phpunit.After checking the updated rule source and test fixtures, the existing documentation only described the "missing operator" case, while the rule actually reports several distinct problems under one identifier. The docs were updated to cover all of them:
'8.1'with no comparison operator.major.minor.patchform (PHPUnit 12.5+, bleeding edge).'abc').The
shortDescriptionfrontmatter was broadened to reflect the wider scope, and a fix example for writing versions in fullmajor.minor.patchform was added.No new identifiers required documentation — all 1097 identifiers in the JSON already have corresponding
.mdfiles.