@pure-unless-callable-is-impure
The @pure-unless-callable-is-impure tag declares a function or method free of side effects on its own, but makes that guarantee conditional on any callable it receives as an argument. This covers higher-order helpers in the shape of array_map or array_filter: the helper itself never touches global state, but it simply invokes whatever callback it was handed, and that callback might. Rather than forcing a choice between marking such a helper unconditionally pure (wrong, if an impure callback is passed) or unconditionally impure (too pessimistic, since most callbacks passed to it are pure), this tag lets purity analysis defer to the callback actually supplied at each call site.
Parsing a @pure-unless-callable-is-impure tag produces a FlagTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every tag already carries.
This is a real PHPStan tag, but it is only documented by its own implementation, not yet covered in PHPStan's narrative docs — see the pull request that added support for it. Psalm has no equivalent.