Repository navigation
Conversation
- The pipe is lowered to one virtual call analysed by the existing call analysers, so its type, argument checks, purity, unused-variable tracking and left-hand taint match the hand-desugared call - A partial application PHP compiles to a direct call gets the piped value in its placeholder; other partial applications stay mixed until closures for them are supported - The left-hand side is analysed once, before the right-hand side whenever the order can matter - Each call of a chain starts at its own callee, as calls are told apart by their start (issue dedupe, taint specialization) - `??` and psalter's unused-assignment removal treat a pipe as a call - The scanner and visitor guards against partial applications are the ones of vimeo#12915, so neither PR conflicts with the other
alies-dev
marked this pull request as ready for review
November 1, 2026 09:02
Contributor
✅ Performance: unchanged · Issues: unchanged
How to read this table
head be58353 · base cee37c4 (merge-base) · workflow run |
…-pipe-operator # Conflicts: # src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOp/CoalesceAnalyzer.php
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.
Psalm infers
mixedfor every pipe (|>) expression, and crashes when the right-hand side is a partial application.Result type
Before
After
Partial application on the right-hand side
Before
After
With two or more
?, or named arguments before..., Psalm analyses the operands but infersmixeduntil #12915 lands. A partial application inside an operand (add(?, 1) |> $f) still crashes, like$f = add(?, 1);does on master; #12915 fixes both.Fixes #11865