packagist vimeo/psalm 3.10.0
Improve help messages

latest releases: 5.x-dev, dev-master, dev-isTypeContainedByType_flags...
4 years ago

Features

Including links in issue output

Some of Psalm's error messages may not be immediately clear to the user. Psalm's default console output now includes links to help documents that provide more context (#2977, #2978):

ERROR: InvalidArgument - somefile.php:8:19 - Argument 1 of getAttribute expects string, int provided (see https://psalm.dev/004)

Other features

  • @ArSn added support for customising Psalter output – by default it inserts two newlines between different docblock sections, but with --add-newline-between-docblock-annotations=false that behaviour is disabled.
  • @ragboyjr added inner closure signature inference for functions that return a closure, allowing you to write fewer docblocks - see #2896 for more
  • if ($expression_that_evaluates_to_true) and if ($expression_that_evaluates_to_false) are now flagged as errors
  • @caugner and @yaegassy improved the documentation around Generator types and the LSP mode, respectively
  • --diff mode now will look at file contents as well as modification time to determine whether it has changed - thanks @bendavies (#2991))
  • @ShiraNai7 improved the return type for parse_url(), making it a little more safe (#2955)

Bugfixes

  • Prevent breakages when analysing files with CRLF line endings (#2953)
  • treat Exception::getMessage as mutation-free (#2956)
  • prevent subclasses overriding final methods (#2958)
  • fixed a couple of unreferenced var false-positives (#2970, #2954)
  • detect assigning collections of mutable objects inside an immutable class (#2946)
  • Don't emit TooManyArguments where one of a union accepts more than the other (#946, #1843)
  • Do more to understand whether the current context has already exited (#2920)
  • Improve handling of special arrray types like lists after passing into a function that unpacks array args (#2982)
  • ignore MixedReturnTypeCoercion when a non-mixed Generator send param is given (#2987)
  • fix erroneous InvalidStaticInvocation when @mixin implements same methods as a parent class (#2989)
  • @LeSuisse improved the params for sodium_base642bin() (#2997)
  • @kelunik added a better return type for Generator::throw and allowed Error to be extended (#3001, #3002)
  • reset property types when analysing a closure defined in a class (#3004)

Don't miss a new psalm release

NewReleases is sending notifications on new releases.