Support for @pure-unless-parameter-passed#259
Merged
Conversation
Member
|
We already have other similar implementation lined up. There's It's not a great look when there's a tag understood by the parser but not by the analyser. I'd like to minimize that coming into the future. It'd be nice to also have the implementation ready in phpstan-src before merging the parser countepart. I will look at this again when phpstan/phpstan-src#3482 is merged and the implementation for |
3 tasks
3 tasks
Contributor
|
@ondrejmirtes phpstan/phpstan-src#6018 is ready; could you please consider merging this PR? |
441036c to
6f65849
Compare
Member
|
Merged and tagged. |
zonuexe
added a commit
to zonuexe/phpstan-src
that referenced
this pull request
Jul 8, 2026
phpstan/phpdoc-parser#259 is merged and released, so replace the generic-tag stopgap with PhpDocNode::getPureUnlessParameterIsPassedTagValues() and bump the dependency.
zonuexe
added a commit
to zonuexe/phpstan-src
that referenced
this pull request
Jul 8, 2026
Resolve the tag into per-parameter flags and merge them across parent PHPDocs. Until phpstan/phpdoc-parser#259 is merged the parser does not understand the tag natively, so parse it from the generic tag value and whitelist the @phpstan- alias in InvalidPHPStanDocTagRule.
zonuexe
added a commit
to zonuexe/phpstan-src
that referenced
this pull request
Jul 8, 2026
phpstan/phpdoc-parser#259 is merged and released, so replace the generic-tag stopgap with PhpDocNode::getPureUnlessParameterIsPassedTagValues() and bump the dependency.
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.
refs phpstan/phpstan#11884 (comment)