Pslam v3.5.0 Release Notes

Release Date: 2019-09-08 // 15 days ago
  • Immutability

    πŸ‘ Psalm now has support for detecting and enforcing immutability (#1272). Includes support for new annotations

    Other features

    • πŸ—„ DeprecatedClass now emitted when it's used in a function signature (#2028)
    • there are now a few more unions with mixed allowed, which means Psalm can find more bugs in not-fully-typed code (#2046)
    • βž• added some more documentation - thanks @staabm and @lhchavez (#2056, #2068)
    • Separate "hello"++ and similar issues into separate StringIncrement issue for people who use that feature (#2061)
    • Psalm now forgets property assertions made when calling functions known to alter those properties. This previously required setting the rememberPropertyAssignmentsAfterCall flag to "false". Now that flag is not required in most cases (#886, #1812)

    πŸ›  Bugfixes

    • πŸ—„ Prevent crash when using @deprecated above variable annotation (#2041)
    • πŸ›  Fix some false-positives around unused variables and unused functions (#2047, #2053, #2052, #2062, #2089)
    • πŸ›  Fix iteration inference over SimpleXMLElement (#2045)
    • πŸ›  Fix Generator::throw param type - thanks @kelunik (#2059)
    • πŸ‘Œ Improve understanding of assignments in elseif (#2073)
    • πŸ‘ Allow mixed array to be assigned specific string keys (#2048)
    • πŸ‘ Allow more complex properties to have their type inferred (#2071)
    • πŸ›  Fix assingmentref type - thanks @lhchavez (#2077)
    • πŸ‘ Allow Assert::true and comparable to assert general truthiness (#2081)
    • method_exists should not alter first string type (#2083)
    • πŸ›  Fix loading order of Psalm\Internal\Fork\Pool - thanks @Nyholm (#2082)
    • πŸ‘Œ Improve use of closure docblocks (#2089)
    • πŸ›  Fix handling of hideExternalErrors config (#2074)
    • πŸ– Handle $this docblock types in traits (#2091)
    • Psalter - don't replace more specific return types when @inheritdoc present (#2013)
    • Unused code detection Prevent vendor method-implementing classes from UnusedMethod (#910)
    • πŸ›  Fix param type for PDO::lastInsertId - thanks @ADmad (#2092)
    • Respect @method annotations even when method exists (#2095)
    • πŸ‘ Allow @psalm-assert to propagate property assertions to non-$this vars - thanks @lhchavez (#2099)
    • πŸ‘Œ Improve handling of generated template class from templated class-string (#2106)
    • Don’t crash with bad @method (#2104)
    • πŸ‘‰ Use better fallback for callmap functions when types don’t match (#2101)