php-standard-library/psalm-plugin
Psalm plugin for PHP Standard Library (PSL) that improves type inference for PSL Type\specifications. Enables more precise array/shape types (e.g., Type\shape coercions) so Psalm reports correct, specific types during static analysis.
Psl\Type\nullish() return type provider by @veewee in https://github.com/php-standard-library/psalm-plugin/pull/18Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/2.3.0...2.4.0
Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/2.2.1...2.3.0
Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/2.2.0...2.2.1
Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/2.1.0...2.2.0
Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/2.0.2...2.1.0
added compatibility with Psalm 5.0
Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/1.1.3...1.1.4
added compatibility with Psalm 5.0
Full Changelog: https://github.com/php-standard-library/psalm-plugin/compare/2.0.0...2.0.1
Psl\Iter\last_keyPsl\Iter\first_keynew return type providers:
Regex\capture_groups return Type\TypeInterface<array{0: string, T1: string, T2: string, ...}> when argument type is array{0: T1, 1: T2, ...} and all properties ( Tn ) are literal. ( thanks to @veewee )Iter\count return positive-int when $iterable is a non-empty-list<_>.Iter\count return positive-int when $iterable is a non-empty-array<_, _>.Iter\count return int(0) when $iterable is empty&array<_, _>Iter\count return int(x) when $iterable is a non-empty-list<_> with a known count, where x is the size of $iterable.Iter\count return int(x) when $iterable is a non-empty-array<_, _> with a known count, where x is the size of $iterable.Iter\last return Tv when $iterable is a non-empty-list<Tv>.Iter\last return Tv when $iterable is a non-empty-array<_, Tv>.Iter\last return null when $iterable is empty&array<_, _>Iter\last return Tv when $iterable is array{...} with at least 1 property.Iter\first return Tv when $iterable is a non-empty-list<Tv>.Iter\first return Tv when $iterable is a non-empty-array<_, Tv>.Iter\first return null when $iterable is empty&array<_, _>Iter\first return Tv when $iterable is array{...} with at least 1 property.Str\after return null|lowercase-string when the first argument is lowercase-string.Str\after_last return null|lowercase-string when the first argument is lowercase-string.Str\after_ci return null|lowercase-string when the first argument is lowercase-string.Str\after_last_ci return null|lowercase-string when the first argument is lowercase-string.Str\before return null|lowercase-string when the first argument is lowercase-string.Str\before_last return null|lowercase-string when the first argument is lowercase-string.Str\before_ci return null|lowercase-string when the first argument is lowercase-string.Str\before_last_ci return null|lowercase-string when the first argument is lowercase-string.Str\Byte\after return null|lowercase-string when the first argument is lowercase-string.Str\Byte\after_last return null|lowercase-string when the first argument is lowercase-string.Str\Byte\after_ci return null|lowercase-string when the first argument is lowercase-string.Str\Byte\after_last_ci return null|lowercase-string when the first argument is lowercase-string.Str\Byte\before return null|lowercase-string when the first argument is lowercase-string.Str\Byte\before_last return null|lowercase-string when the first argument is lowercase-string.Str\Byte\before_ci return null|lowercase-string when the first argument is lowercase-string.Str\Byte\before_last_ci return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\after return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\after_last return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\after_ci return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\after_last_ci return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\before return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\before_last return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\before_ci return null|lowercase-string when the first argument is lowercase-string.Str\Grapheme\before_last_ci return null|lowercase-string when the first argument is lowercase-string.Str\chunk returns non-empty-list<non-empty-string> if $string is non-empty-stringStr\chunk returns non-empty-list<non-empty-lowercase-string> if $string is non-empty-lowercase-stringStr\Byte\chunk returns non-empty-list<non-empty-string> if $string is non-empty-stringStr\Byte\chunk returns non-empty-list<non-empty-lowercase-string> if $string is non-empty-lowercase-stringStr\lowercase returns non-empty-lowercase-string if $string is non-empty-string or non-falsy-stringStr\Byte\lowercase returns non-empty-lowercase-string if $string is non-empty-string or non-falsy-stringStr\repeat returns non-empty-lowercase-string if $string is non-empty-lowercase-stringStr\repeat returns non-empty-string if $string is non-empty-stringStr\repeat returns lowercase-string if $string is lowercase-stringStr\repeat returns string(x) if $string is a literal, and $multiplier is literal, where x is the result.Str\slice returns lowercase-string if $string is lowercase-stringStr\Byte\slice returns lowercase-string if $string is lowercase-stringStr\Grapheme\slice returns lowercase-string if $string is lowercase-stringStr\splice returns lowercase-string if $string is lowercase-string and $replacement is lowercase-stringStr\Byte\splice returns lowercase-string if $string is lowercase-string and $replacement is lowercase-stringStr\split returns non-empty-list<non-empty-string> if $string is non-empty-stringStr\split returns non-empty-list<non-empty-lowercase-string> if $string is non-empty-lowercase-stringStr\Byte\split returns non-empty-list<non-empty-string> if $string is non-empty-stringStr\Byte\split returns non-empty-list<non-empty-lowercase-string> if $string is non-empty-lowercase-stringStr\uppercase returns non-empty-string if $string is non-empty-stringStr\Byte\uppercase returns non-empty-string if $string is non-empty-stringHow can I help you explore Laravel packages today?