Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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#14850
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

@phpstan-bot

Copy link
Copy Markdown
Contributor

The latest website/src/errorsIdentifiers.json update shifted the source locations for the phpunit.attributeRequiresPhpVersion identifier (from 4 to 5 locations), reflecting a new error message added to AttributeRequiresPhpVersionRule in 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:

  • Version requirement is missing operator — bare version like '8.1' with no comparison operator.
  • Version requirement without operator is deprecated — same bare form when phpstan-deprecation-rules is installed.
  • Version requirement is incomplete — the new message; version not in full major.minor.patch form (PHPUnit 12.5+, bleeding edge).
  • Version requirement will always evaluate to false — constraint that can never match any analysed PHP version.
  • Unparsable constraint strings (e.g. 'abc').

The shortDescription frontmatter was broadened to reflect the wider scope, and a fix example for writing versions in full major.minor.patch form was added.

No new identifiers required documentation — all 1097 identifiers in the JSON already have corresponding .md files.

- 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
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.