packagist vimeo/psalm 3.8.2

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

Features

Support for the @mixin docblock annotation, which allows a class to proxy the methods and properties of another.

I also made a slight change in how magic getters & setters are dealt with – Psalm will emit an UndefinedMagicProperty if you define a docblock @property string $foo and then request the unlisted property $bar. If you wanted this behaviour previously you had to also annotate your class with @psalm-seal-properties. This is now assumed if you provide a @mixin or @property annotation for the given class. In the event the property is missing, Psalm now emits an UndefinedMagicProperty issue that you can suppress in a more granular fashion.

Bugfixes

  • Fix references to templates in other methods inside templated methods (#2532)
  • Add better return types for PDOStatement::fetch - thanks @duskwuff (#2529 and #2553)
  • Don't crash when attempting to analyse classes that weren't first scanned (#2505)
  • Fix return types when return instances of anonymous classes (#2494)
  • Allow unions inside array assertions (#2409)
  • Preserve complex intersection templates (#2537)
  • Prevent invalid argument issue when inheriting from a class_alias class (#2539)
  • Verify variable variable assignment (#2541)
  • Documentation updates from @mfn and @LeSuisse - thanks!
  • Warn about posix inexistence before using threads (#2335)
  • Register uses on variables set inside loops with break and continue (#2546)
  • Refine type of (int) (bool) $foo – thanks @SignpostMarv (#2550)
  • Improve reconciliation after assertion and function call in conditional (#2558)
  • Fix templated class-string as a proper sub-type of class-string (#2554)
  • Reconcile callable assertions better

Don't miss a new psalm release

NewReleases is sending notifications on new releases.