diff --git a/src/MetadataFactory.php b/src/MetadataFactory.php index b2e02a2..08470b3 100644 --- a/src/MetadataFactory.php +++ b/src/MetadataFactory.php @@ -90,7 +90,11 @@ public function getMetadataForClass(string $className) if (null !== $classMetadata) { if (!$classMetadata instanceof ClassMetadata) { - throw new \LogicException(sprintf('The cache must return instances of ClassMetadata, but got %s.', var_export($classMetadata, true))); + throw new \LogicException(sprintf( + 'The cache must return instances of ClassMetadata for class %s, but got %s.', + $className, + var_export($classMetadata, true) + )); } if ($this->debug && !$classMetadata->isFresh()) {