From d5c599c962cadc13acb206b932a8e3a74fc46025 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Tue, 17 Oct 2023 17:29:34 +0200 Subject: [PATCH] Fix subclass acceptability when class alias is involved on "ours" side --- src/Type/ObjectType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Type/ObjectType.php b/src/Type/ObjectType.php index 7f18546d3e..1fd2236087 100644 --- a/src/Type/ObjectType.php +++ b/src/Type/ObjectType.php @@ -456,12 +456,12 @@ private function checkSubclassAcceptability(string $thatClass): AcceptsResult if ($thisReflection->isInterface() && $thatReflection->isInterface()) { return AcceptsResult::createFromBoolean( - $thatReflection->implementsInterface($this->className), + $thatReflection->implementsInterface($thisReflection->getName()), ); } return AcceptsResult::createFromBoolean( - $thatReflection->isSubclassOf($this->className), + $thatReflection->isSubclassOf($thisReflection->getName()), ); }