packagist psalm/plugin-laravel v3.14.4

5 hours ago

This patch sharpens type inference across collections, the console, and the Date facade, and improves Laravel 11 support by handling Carbon 2.

Features

  • Narrow Command::hasArgument()/hasOption() to literal bool, and fix hasOption() shortcut/negation semantics (#1161)
  • Resolve the configured date class for Date facade static calls (#1157)
  • Infer the named-argument object shape returned by the literal() helper (#1160)
  • Narrow config()->collection() to Collection<key, value> (#1159)
  • Narrow random() return type on Enumerable and LazyCollection (#1152)

Fixes

  • Allow a null option shortcut in Command::getOptions() (#1166)
  • Type the Model::loadCount() constraint closure as Builder (#1164)
  • Allow null values in the __() $replace parameter (#1151)
  • Support Carbon 2 alongside Carbon 3 for better Laravel 11 coverage (#1148)
  • Stop the guard taint warning for SessionGuard::hashPasswordForCookie() on Laravel 11 (#1146)
  • Stop psalm-plugin init from silently disabling type analysis on Psalm 6 (#1144)

Full Changelog: v3.14.2...v3.14.4

Don't miss a new plugin-laravel release

NewReleases is sending notifications on new releases.