Skip to content

[LiveComponent] Uuid are not natively (de)hydrated #1846

Closed
@Wait4Code

Description

@Wait4Code

I'm not sure if it is covered by the "Future H)" item of #102 issue but I've noticed that LiveComponent crash when trying to (de)hydrate Uuid.

More precisely, in LiveComponentHydrator#dehydrateObjectValue() method, line 507, (new PropertyInfoExtractor([new ReflectionExtractor()]))->getProperties($classType) returns null which makes the foreach loop crash.

This is quite annoying when using Uuid in a DTO class that mixed entities and simple DTOs. I could use useSerializerForHydration option on LineProp but then I would need to manage serialization in my entity which can be a burden.
I will try to get through this by creating an Hydration Extension for Uuid but I think this would be a nice addition if it could be managed by Live Component natively.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions