Skip to content

Commit 4505e2a

Browse files
committed
throw TypeErrors to prepare for type hints in 5.0
1 parent 94b24ac commit 4505e2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PropertyInfo/DoctrineExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct($entityManager)
4242
@trigger_error(sprintf('Injecting an instance of "%s" in "%s" is deprecated since Symfony 4.2, inject an instance of "%s" instead.', ClassMetadataFactory::class, __CLASS__, EntityManagerInterface::class), E_USER_DEPRECATED);
4343
$this->classMetadataFactory = $entityManager;
4444
} else {
45-
throw new \InvalidArgumentException(sprintf('$entityManager must be an instance of "%s", "%s" given.', EntityManagerInterface::class, \is_object($entityManager) ? \get_class($entityManager) : \gettype($entityManager)));
45+
throw new \TypeError(sprintf('$entityManager must be an instance of "%s", "%s" given.', EntityManagerInterface::class, \is_object($entityManager) ? \get_class($entityManager) : \gettype($entityManager)));
4646
}
4747
}
4848

0 commit comments

Comments
 (0)