Psalm v4.1.0 Release Notes

Release Date: 2020-10-30 // 7 months ago
  • ๐Ÿ”‹ Features

    ๐Ÿ‘ This adds basic support for PHP 8 attributes (#4367). Psalm checks attribute arguments, and also emits a UndefinedAttributeClass issue if the attribute cannot be found.

    This version of Psalm can also be installed when using PHP 8.

    ๐Ÿ›  Bugfixes

    • class getIterator calls are used inside loops (#3625)
    • ๐Ÿ‘ allow Psalm to understand more assignments when evaluating implicit else (#4374)
    • promoted properties are always used in the constructor (#4386)
    • arraylike-object should be Countable too (#4398)
    • signature types (return & param types) weren't being invalidated when their use changed, now they are
    • ๐Ÿ‘ allow multiple @psalm-assert-if-true on a single variable (#4414)
    • ๐Ÿ‘‰ uses better path normalisation when resolveFromConfig="true" so that existing baselines need only small adjustments (#4410)
    • @BenMorel improved some ext-ds stubs (#4415)
    • ๐Ÿ‘ allow implicit null->offsetGet() inside an isset call (#4397)
    • ๐Ÿ›  fix try analysis on assigned vars when they're typed to mixed (#4418)
    • any class with a __toString method in PHP 8 is assumed to implement Stringable (#4429)
    • fix crash when encountering no-argument str_replace, DOMNode::appendChild, crypt, get_class_methods, iterator_to_array, get_object_vars calls
    • prevent unused variable false-positive when (bool) or (float) casts are used (#4435)
    • @enumag improved ext-ds stubs with immutable data structures (#4425)