Skip to content

Commit 49fa189

Browse files
committed
Fix liveProp union type
1 parent 90169b5 commit 49fa189

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/LiveComponent/src/Metadata/LiveComponentMetadataFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function createLivePropMetadata(string $className, string $propertyName,
8484
{
8585
$reflectionType = $property->getType();
8686
if ($reflectionType instanceof \ReflectionUnionType || $reflectionType instanceof \ReflectionIntersectionType) {
87-
throw new \LogicException(\sprintf('Union or intersection types are not supported for LiveProps. You may want to change the type of property "%s" in "%s".', $property->getName(), $property->getDeclaringClass()->getName()));
87+
return new LivePropMetadata($property->getName(), $liveProp, Type::mixed());
8888
}
8989

9090
// BC layer when "symfony/type-info" is not available

0 commit comments

Comments
 (0)