Psalm v4.1.1 Release Notes
Release Date: 2020-11-02 // over 3 years ago-
π Features
More attribute checks
Psalm now checks that you're using attributes correctly (by verifying attribute targets).
int-mask and int-mask-of
π This release also brings support for representing bitmasks concisely with the introduction of a new type
int-mask
.int-mask<1, 2, 4>
is automatically converted to1|2|3|4|5|6|7
.Another new type,
int-mask-of
, allows you to represent masks of multiple values from a single source queryGiven
class FileFlag { public const OPEN = 1; public const MODIFIED = 2; public const NEW = 4; }
int-mask-of<FileFlag::*>
is equivalent toint-mask<FileFlag::OPEN, FileFlag::MODIFIED, FileFlag::NEW>
π Bugfixes
- π Psalm now supports multiline
@extends
and@implements
docblock tags (#4453) - π¦ Psalmβs cache now gets busted in more situations when using a self-packaged Phar
- Only treat two variables as the same if they were set in the same place (#4467)
- π Psalm now performs better inference after
if (!class_exists($foo, false)) { return; }
(#4466)
- π Psalm now supports multiline