Repository navigation
Update Error Docs - #15362
Open
phpstan-bot wants to merge 1 commit into
Open
Update Error Docs#15362phpstan-bot wants to merge 1 commit into
phpstan-bot wants to merge 1 commit into
Conversation
- Add method.impureOverridePureUnlessParameterPassed - Add pureFunction/pureMethod/purePropertyHook.nonOptionalParameterPassed - Add pureFunction/pureMethod/purePropertyHook.parameterPassedNotByRef
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.
Adds documentation for 7 error identifiers related to the new
@pure-unless-parameter-passedPHPDoc tag that had no.mdfiles inwebsite/errors/:method.impureOverridePureUnlessParameterPassed: an impure method overrides a parent method marked@pure-unless-parameter-passed. Introduced in phpstan-src b0e7a99. It is reported byMethodSignatureRulewhenreportMethodPurityOverrideis on, which is part of Bleeding Edge.pureFunction.nonOptionalParameterPassed,pureMethod.nonOptionalParameterPassed,purePropertyHook.nonOptionalParameterPassed: the tagged parameter is required, so the function can never be pure.pureFunction.parameterPassedNotByRef,pureMethod.parameterPassedNotByRef,purePropertyHook.parameterPassedNotByRef: the tagged parameter is passed by value, so the tag has no meaning.The error messages and examples come from
FunctionPurityCheck,MethodSignatureRule, and their test fixtures in phpstan-src 2.3.x (pure-unless-parameter-passed.php,pure-unless-parameter-passed-method.php,method-signature-pure-unless-parameter-passed.php). PHP does not allow defaults or by-reference parameters on property hook parameters, so the two property hook pages explain that they exist for consistency with the function and method variants.The rest of the commit diff only moved line numbers in existing
MethodSignatureRuleURLs (method.childParameterType,method.childReturnType). Those docs did not need changes.🤖 Generated with Claude Code