Skip to content

Commit 4dd20c4

Browse files
[Serializer] Improve perf a bit by not using a signaling exception when not needed
1 parent 886c810 commit 4dd20c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DependencyInjection/MessengerPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private function registerHandlers(ContainerBuilder $container, array $busIds)
131131
$method = $method['method'] ?? '__invoke';
132132
}
133133

134-
if (!\class_exists($messageClass) && !\interface_exists($messageClass)) {
134+
if (!\class_exists($messageClass) && !\interface_exists($messageClass, false)) {
135135
$messageClassLocation = isset($tag['handles']) ? 'declared in your tag attribute "handles"' : $r->implementsInterface(MessageSubscriberInterface::class) ? sprintf('returned by method "%s::getHandledMessages()"', $r->getName()) : sprintf('used as argument type in method "%s::%s()"', $r->getName(), $method);
136136

137137
throw new RuntimeException(sprintf('Invalid handler service "%s": message class "%s" %s does not exist.', $serviceId, $messageClass, $messageClassLocation));

0 commit comments

Comments
 (0)