Skip to content

chore(deps): update dependency vimeo/psalm to v7.19.0 - #299

Merged
jkowalleck merged 1 commit into
mainfrom
renovate/psalm-vimeo-psalm-7.x
Nov 25, 2026
Merged

jkowalleck merged 1 commit into
mainfrom
renovate/psalm-vimeo-psalm-7.x

Conversation

@renovate

@renovate renovate Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
vimeo/psalm 7.12.0 → 7.19.0 age confidence

Release Notes

vimeo/psalm

v7.19.0

Compare Source

What's Changed

Features
Fixes
Internal changes

New Contributors

Full Changelog: vimeo/psalm@7.18.0...7.19.0

v7.18.0: Contravariant templates

Compare Source

Features

  • @template-contravariant (also @psalm- and @phpstan-template-contravariant): a template for a class that only takes values, such as a handler, writer or mapper. A Sink<Animal> fits where a Sink<Dog> is expected, not the other way round, and Psalm reports the template where the class gives a value out.
    /** @template-contravariant T */
    interface Sink {
        /** @param T $value */
        public function put(mixed $value): void;
    
        /** @return T */
        public function last(): mixed; // InvalidTemplateParam
    }
    
    /** @param Sink<Dog> $sink */
    function takesDogSink(Sink $sink): void {}
    
    /** @param Sink<Animal> $animals */
    function f(Sink $animals): void {
        takesDogSink($animals); // no issue
    }
    Plugins read the variance with ClassLikeStorage::getTemplateVariance(). See Template contravariance; the templated annotations page was rewritten with checked examples. (#​14669, @​alies-dev)
  • Performance profile: --debug-performance (short name --profile) prints where a run spent its time and memory: stages, workers, the slowest files, statements and functions, and plugin handlers. With a path it also writes a JSON profile that you can drop on https://psalm.dev/profile/ to see it as charts; the page reads it in your browser and sends it nowhere.
    vendor/bin/psalm --no-cache --profile=psalm-perf.json
    See Finding out why Psalm is slow. (#​14737, #​14769, #​14807, @​alies-dev)
  • Agent skill for Psalm users: skills/psalm teaches AI coding agents to run Psalm, fix its issues, write annotations and edit psalm.xml the way the docs recommend. Install it with npx skills add vimeo/psalm --skill psalm, with the llm/skills Composer plugin, or by copying vendor/vimeo/psalm/skills/psalm into your agent's skills directory. (#​13152, @​roxblnfk; #​14751, @​danog; #​14795, @​roxblnfk)

Performance

Fixes

Templates and type variables
  • new Pipe(fn (int $x) => ...) with a Closure(T): void constructor param caps T at int, so a later $pipe->push('s') is IncompatibleTypeParameters instead of reaching the int callback. (#​14669, @​alies-dev)
  • A covariant template in the bound of a method template (@template U of T) is reported in a param even after an earlier param used U legally. (#​14669, @​alies-dev)
  • Callbacks over a widened type variable (new Coll([1]), then $c->add('x')) see every value it holds, not only the construction-site ones. (#​14551, @​shu-chen-dot-ca)
  • null no longer fits a template without a bound: fn() => null for callable(): T, [null] for list<T>. (#​14550, @​shu-chen-dot-ca)
  • Trait method params use the types given to @use. (#​13429, @​jirkace)
  • @implements Wrapper<static> resolves static to the object it is read from, and chained calls on such a value no longer hang. (#​14572, @​jirkace)
  • @return static<NewK, NewV> on a template receiver keeps its new type arguments. (#​14579, @​jirkace)
  • An implementation with the same conditional return type as its interface method is not an ImplementedReturnTypeMismatch. (#​14502, @​jirkace)
  • A conditional return type reads an argument that does not fit its param as it is (preg_replace() on an array of Stringable returns an array). (#​14421, @​jirkace)
  • A template array T read at a key-of<T> offset is value-of<T>. (#​14586, @​jirkace)
  • is_int(), is_scalar() and similar checks narrow a template bounded by scalar, numeric, array-key or an int range instead of reporting DocblockTypeContradiction. (#​14545, @​jirkace)
  • A literal class name can be identical to a template class-string<T>. (#​14365, @​jirkace)
  • Iterating a star-projected collection (Coll<*>) gives the template's bound instead of mixed. (#​14666, @​alies-dev)
  • Generated stubs keep @template, the variance and the declared order of templates instead of marking every template @template-covariant. (#​14669, @​alies-dev)
Narrowing and arrays
  • $a !== $b with several possible values of $b doesn't exclude them all from $a. (#​14525, @​jirkace)
  • After isset($array[$k]) with $k one of several literal keys, $array[$k] is the value of those keys. (#​14646, @​jirkace)
  • $arr[$key] stays known to be set when $key is narrowed inside if (isset($arr[$key])). (#​13344, @​jirkace)
  • InvalidArrayOffset is reported when an item is read again under an index narrowed to a key the array can't have. (#​14767, @​orklah)
  • ($a ?? null) !== null asserts isset($a). (#​14517, @​jirkace)
  • instanceof a parent class narrows to the parent class. (#​14318, @​jirkace)
  • get_class() of a union of classes is the name of any of them. (#​14366, @​jirkace)
  • A property of an object intersected with an object shape (V&object{x: string}) has the type of both. (#​14546, @​jirkace)
  • With ensureArray*OffsetsExist, an offset that may be one of several literals is set only when each of them is. (#​14606, @​jirkace)
  • Appends stop growing a list shape at maxShapedArraySize. (#​14641, @​jirkace)
  • Quoted keys of an array shape are read as PHP string literals ("a\r\nb"). (#​14600, @​jirkace)
  • No crash on PHP 8.5 for an array key that reads as a huge number, such as the UUID '6e5212ed-…' in Symfony's Form constraint. (#​14797, @​leonardsimonse)
  • pow() of two int literals is an int literal. (#​14505, @​MikeFTV)
Control flow
  • A variable unset before a continue or break is possibly undefined after the loop. (#​14509, @​jirkace)
  • A property or offset narrowed before a loop forgets the narrowing after a break that reassigned it. (#​14456, @​jirkace)
  • Variables assigned in the left operand of a negated && are defined in the next operands of the enclosing &&. (#​14409, @​jirkace)
  • A superglobal assigned on some paths only keeps its default type on the others. (#​14406, @​jirkace)
  • A closure that falls through after a throw or exit in a branch returns void, not never. (#​14793, @​MikeFTV)
  • The return of a required file keeps the use of the outer return, so it is no UnusedFunctionCall. (#​14562, @​jirkace)
Callables and nullsafe calls
  • Arguments of a call after a ?-> in a chain are analysed with a non-null receiver, as PHP skips the whole chain when it is null. (#​14608, @​jirkace)
  • The if-true assertions of a method called with ?-> apply where the call is truthy. (#​14531, @​jirkace)
  • An enum case with __invoke() is callable. (#​14590, @​jirkace)
  • A first-class callable of a method that an unsealed class forwards to __call() is not an UndefinedMagicMethod. (#​14411, @​jirkace)
  • static in closure hints of calls in a trait on other objects resolves to that object. (#​14446, @​jirkace)
  • A Closure object of unknown signature is a Closure. (#​14599, @​jirkace)
  • No crash on a callable array whose object intersects a template. (#​14594, @​jirkace)
  • yield from forwards the send type of the inner generator. (#​14340, @​jirkace)
Reported issues
  • A value that shares only null or false with the expected type is InvalidArgument, not PossiblyInvalidArgument, in closure params of array_map() and similar functions and in __set() calls on a @property. (#​14742, @​orklah)
  • ParadoxicalCondition on a dead || operand next to other values of the same variable. (#​14821, @​orklah)
  • No ParamNameMismatch for a name another overridden method uses. (#​14536, @​jirkace)
  • No MethodSignatureMismatch for @no-named-arguments on parameterless methods. (#​14799, @​orklah)
  • A write through a set hook is checked against the hook's param type. (#​14538, @​jirkace)
  • Properties that array_column() reads are used. (#​14560, @​jirkace)
  • Before PHP 8.6, unsetting, passing by reference or referencing a property of a constant object is reported. (#​14519, @​jirkace)
  • @implements naming an interface the class doesn't implement gets the same message with or without type arguments. (#​14650, @​jirkace)
  • @psalm-suppress before the expression of echo or <?= is read. (#​14527, @​jirkace)
Stubs
CLI, config and tools

Internal changes

New Contributors

Full Changelog: vimeo/psalm@7.17.0...7.18.0

v7.17.0

Compare Source

What's Changed

Features
Fixes
  • fix(class-string): get_parent_class() without an argument is bound to the parent class by @​jirkace in #​14316
  • fix(property-map): ShellExec::$parts and MatchArm::$conds match php-parser v5 by @​jirkace in #​14341
  • fix(assertion): count() compared to a constant narrows like a literal by @​jirkace in #​14323
  • fix(cli): a missing root directory is shown as given when it is absolute by @​jirkace in #​14345
  • fix(foreach): the iterated expression is analysed once for getIterator() by @​jirkace in #​14370
  • fix(property): an offset write initializes an uninitialized array property by @​jirkace in #​14358
  • fix(docblock): @​psalm-import-type is read from any docblock before the class by @​jirkace in #​14328
  • fix(unused-code): a method verified to return $this has no unused return value by @​jirkace in #​14337
  • fix(combiner): a non-empty array and a Traversable are not combined into iterable by @​jirkace in #​14425
  • fix(stubs): ArrayObject and ArrayIterator use the PHP 8 parameter names by @​jirkace in #​14324
  • fix(arithmetic): int ** int may be a float when the exponent may be negative by @​jirkace in #​14317
  • fix(stubs): strtolower and mb_strtolower of string literals are the lowercased literals by @​jirkace in #​14321
  • fix(isset): keep the array value type when an ArrayAccess object is a union alternative by @​jirkace in #​13118
  • fix(templates): new of the class itself binds its templates from the arguments by @​jirkace in #​13425
  • fix(assertion): !== a bool literal of a template bounded by mixed is possible by @​jirkace in #​14362
  • fix(enum): report a circular reference of an enum case value instead of crashing by @​jirkace in #​14350
  • fix(switch): continue N targeting an outer switch leaves it like break N by @​jirkace in #​14368
  • fix(comparison): loose comparison of numeric string literals compares their numbers by @​jirkace in #​14369
  • fix(loop): a variable assigned in the right operand of || is defined after a while loop left through its condition by @​jirkace in #​14396
  • fix(baseline): a character XML 1.0 forbids in the selected text keeps the baseline loadable by @​jirkace in #​14352
  • fix(arrays): a nested write under a key a list doesn't have creates the offset by @​jirkace in #​14434
  • fix(templates): a template of numeric can be identical to a string by @​jirkace in #​14430
  • fix(override): #[\Override] on a property without a parent property is an InvalidOverride by @​jirkace in #​14390
  • fix(algebra): a falsy variable holding a condition narrows to its negation by @​jirkace in #​14441
  • fix(class_exists): the code after an if chain knows the classes of every block that reaches it by @​jirkace in #​14435
  • fix(constant): use const imports win over the PHP constant of the same name by @​jirkace in #​14325
  • fix(docblock): a param docblock of an implementation keeps the inherited return type by @​jirkace in #​14360
  • fix(try): a variable assigned on some paths of a finally block keeps that type after the try by @​jirkace in #​14416
  • fix(list): a write under the key array_key_last() returned for a list keeps it a list by @​jirkace in #​14428
  • fix(templates): an int range bound to a constructor-only template stays open by @​jirkace in #​12944
  • Fix --generate-stubs signatures for intersections, true/never/static/parent, enums and readonly by @​shu-chen-dot-ca in #​14114
  • Fix assertions on $this of calls with no object, and make call-site InvalidDocblock suppressible by @​orklah in #​14678
  • Expand the params of a final class's method with its static as the class itself by @​shu-chen-dot-ca in #​14203
  • Write through an ArrayAccess item of an array with its offsetSet() by @​danog in #​14422
  • Taint the items destructured from a mixed value or an ArrayAccess object by @​danog in #​14225
  • Report the extensions the PHP 8.6 stub image doesn't build yet by @​danog in #​14683
  • Check the extension of a symbol in every PHP version composer.json allows by @​danog in #​14685
  • Give a foreach over an IteratorAggregate the taints of what getIterator() returns by @​danog in #​14687
  • Keep the intersection of a template return type resolved to object by @​danog in #​14684
  • Report the sinks of PDO and other extensions composer.json doesn't require by @​danog in #​14688
  • Fix master CI by [@​danog](https://redirect.github.com/danog

[!IMPORTANT]
✂ PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Only on Sunday and Saturday (* * * * 0,6)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate
renovate Bot force-pushed the renovate/psalm-vimeo-psalm-7.x branch from af5c769 to 2caeb22 Compare November 25, 2026 11:11
@renovate renovate Bot changed the title Update dependency vimeo/psalm to v7.16.0 chore(deps): update dependency vimeo/psalm to v7.19.0 Nov 25, 2026
@jkowalleck
jkowalleck merged commit 1485234 into main Nov 25, 2026
15 of 16 checks passed
@jkowalleck
jkowalleck deleted the renovate/psalm-vimeo-psalm-7.x branch November 25, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant