Immutable
release. Only release title and notes can be modified.
Added
isNumericString()expectation, narrowing tonumeric-string. The runtime check isis_string+is_numeric, so it accepts exactly the values PHPStan counts asnumeric-string, and unknown string literals prune toneverhasLength(int<1, max> $length)expectation for exact byte lengths, narrowing tonon-falsy-string(non-empty-stringfor a length of 1). The failure context carries{length}and{actual}(the measured length), so a custom message can report a mismatch without exporting a secret-bearing valueisNonEmptyMap()expectation, narrowing tonon-empty-array<string, mixed>isGreaterThan(),isGreaterThanOrEqual(),isLessThan(), andisLessThanOrEqual()expectations for one-sided numeric bounds, narrowing to the bounded int range OR'd with the float arm (e.g.isGreaterThan(5)givesfloat|int<6, max>). Chained bounds clamp:isGreaterThanOrEqual(0)->isLessThanOrEqual(10)narrows tofloat|int<0, 10>hasCount(int<0, max> $count),hasMinCount(int<0, max> $min), andhasMaxCount(int<0, max> $max)expectations for countables, narrowing toarray<mixed>|Countable. A minimum of 1 or more and an exact count statically known to be positive narrow the array arm tonon-empty-array<mixed>;hasCount(0)narrows it toarray{}isArrayAccessible()expectation, narrowing toarray<mixed, mixed>|ArrayAccess
Full Changelog: v1.4.0...v1.5.0