-
Notifications
You must be signed in to change notification settings - Fork 578
Implement @pure-unless-callable-is-impure #3482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ondrejmirtes
merged 29 commits into
phpstan:2.2.x
from
zonuexe:feature/pure-unless-callable-is-impure
Jul 7, 2026
+1,417
−60
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
e752f28
Parse @pure-unless-callable-is-impure PHPDoc tag
zonuexe 53727b9
Thread pure-unless-callable-is-impure through the reflection layer
zonuexe 7b0f228
Wire pure-unless-callable-is-impure into the analyser
zonuexe da3fbca
Mark callback-accepting builtins as pure-unless-callable-is-impure
zonuexe e5f4c50
Add tests for @pure-unless-callable-is-impure
zonuexe d354666
Fix pure-unless-callable-is-impure parameter flag propagation
zonuexe 3fe1829
Suppress call impure points when pure-unless-callable-is-impure callb…
zonuexe bd3febf
Fix CI: avoid named arguments, adjust no-effect fixture
zonuexe 03e7ea4
Cover pure-unless-callable-is-impure verdict for maybe-null and maybe…
zonuexe dbe4eaf
Simplify pure-unless-callable-is-impure metadata reads
zonuexe 498783b
Document the shape of the function metadata array
zonuexe 8d7b559
Mark array_all() and array_any() as pure-unless-callable-is-impure
zonuexe 9bdc1ea
Honor pure-unless-callable-is-impure metadata for stub-reflected func…
zonuexe 4fd839e
Add lint version comment to the PHP 8.4 pure-unless fixture
zonuexe 9d64ec1
Honor @pure-unless-callable-is-impure on methods
zonuexe d1a253d
Note the two paths that intentionally don't thread pure-unless yet
zonuexe 0a6650a
Honor @pure-unless-callable-is-impure on constructor calls
zonuexe ae0e28f
Drop the native mixed property type from the pure-unless fixture
zonuexe 1bc68ff
Restructure NewHandler pure-unless branching to match createFromVariant
zonuexe 92e24b2
Cover a union pure-callable|callable argument on a pure-unless constr…
zonuexe 3ec51f1
Return TrinaryLogic from isPureUnlessCallableIsImpureParameter()
zonuexe 33926fe
Check the body of @pure-unless-callable-is-impure functions for purity
zonuexe 160db8c
Report redundant @pure-unless-callable-is-impure on a pure callable
zonuexe 43f61e8
Return TrinaryLogic from getPureUnlessCallableIsImpureParameters()
zonuexe b6f0d66
Report impure methods overriding @pure-unless-callable-is-impure methods
zonuexe 33f825a
Add a direct unit test for resolvePureUnlessCallableIsImpureVerdict()
zonuexe f0cf3d4
Make SimpleImpurePointTest a self-contained unit test
zonuexe 4859c2f
Share the pure-unless-callable verdict-to-certainty decision
zonuexe 07722d2
Revert the direct mutation-testing unit test and verdict helper
zonuexe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.