Skip to content

Commit 2e3ef85

Browse files
committed
prevent failures around not existing TypeInfo classes
Having a getType() method on an extractor is not enough. Such a method may exist to be forward-compatible with the TypeInfo component. We still must not call it if the TypeInfo component is not installed to prevent running into errors for not-defined classes when the TypeInfo component is not installed.
1 parent 85a90c0 commit 2e3ef85

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Mapping/Loader/PropertyInfoLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function loadClassMetadata(ClassMetadata $metadata): bool
175175
*/
176176
private function getPropertyTypes(string $className, string $property): TypeInfoType|array|null
177177
{
178-
if (method_exists($this->typeExtractor, 'getType')) {
178+
if (class_exists(TypeInfoType::class) && method_exists($this->typeExtractor, 'getType')) {
179179
return $this->typeExtractor->getType($className, $property);
180180
}
181181

0 commit comments

Comments
 (0)