Skip to content

Commit 9fcf4f1

Browse files
[Serializer] Improve perf a bit by not using a signaling exception when not needed
1 parent 8743faf commit 9fcf4f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

FormConfigBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public function __construct($name, ?string $dataClass, EventDispatcherInterface
179179
{
180180
self::validateName($name);
181181

182-
if (null !== $dataClass && !class_exists($dataClass) && !interface_exists($dataClass)) {
182+
if (null !== $dataClass && !class_exists($dataClass) && !interface_exists($dataClass, false)) {
183183
throw new InvalidArgumentException(sprintf('Class "%s" not found. Is the "data_class" form option set correctly?', $dataClass));
184184
}
185185

0 commit comments

Comments
 (0)