You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Infer return type from class-string<T> argument in ClassResolver extensions
When a variable typed as class-string<T> is passed to
ClassResolverInterface::getInstanceFromDefinition() or Drupal::classResolver(),
PHPStan now infers the return type as T instead of falling back to object.
The existing service-ID and constant-string class-name resolution via ServiceMap
is unchanged. This only fills the gap for non-constant class-string<T> variables.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments