·
2 commits
to 1.x
since this release
Immutable
release. Only release title and notes can be modified.
Added
isNonEmptyList()expectation, narrowing tonon-empty-list<mixed>isSameOrSubclassOf(class-string<T>|T $class)expectation, the non-strict counterpart ofisSubclassOf, narrowing toclass-string<T>|Tfor the given class as well as its subclasses. UnlikeisSubclassOf, a literal class argument also narrows undernot(), tomixed~(class-string<T>|T)implementsInterface(class-string<T> $interface)expectation, narrowing toclass-string<T>isInstanceOfAny(non-empty-list<class-string> $classes)expectation, narrowing to the union of the given classes, or toobjectwhen the list is not known staticallyisClassString()expectation, narrowing toclass-string. Accepts interface names as well as class names, matching what PHPStan counts as aclass-string
Changed
ExpectationMethodResolver::__construct()now takes aPHPStan\Reflection\ReflectionProvider. The service is autowired throughextension.neon, so registration is unaffected
Full Changelog: v1.3.0...v1.4.0