File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -832,14 +832,8 @@ static function (string $variance): TemplateTypeVariance {
832832 }
833833
834834 // Check for a generic type alias (e.g. MyList<string>) before falling through to
835- // class-based generic resolution, but only when the name is not itself a resolvable
836- // class — in that case the class-based path must win to preserve backward compatibility
837- // (a type alias like BelongsTo<T, U> = \Eloquent\BelongsTo<T, U> should still produce
838- // the same GenericObjectType that class-based resolution would have given).
839- $ resolvedGenericName = $ nameScope ->resolveStringName ($ typeNode ->type ->name );
840- $ genericTypeAlias = !$ this ->getReflectionProvider ()->hasClass ($ resolvedGenericName )
841- ? $ this ->findGenericTypeAlias ($ typeNode ->type ->name , $ nameScope )
842- : null ;
835+ // class-based generic resolution.
836+ $ genericTypeAlias = $ this ->findGenericTypeAlias ($ typeNode ->type ->name , $ nameScope );
843837 if ($ genericTypeAlias !== null ) {
844838 $ templateNodes = $ genericTypeAlias ->getTemplateTagValueNodes ();
845839 $ totalParams = count ($ templateNodes );
You can’t perform that action at this time.
0 commit comments