Skip to content

Conversation

nikophil
Copy link
Contributor

@nikophil nikophil commented May 13, 2025

Hello,

such live prop cannot currently be hydrated by LiveComponentHydrator::hydrateValue() because nullability is not handled and the serializer is asked to deserialize null into MyDTO

    #[LiveProp(writable: true, useSerializerForHydration: true)]
    public ?MyDTO $myDTO = null;

this PR fixes this problem

NB: all the failures in the CI are unrelated to this fix

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label May 13, 2025
@nikophil nikophil changed the title fix: allow LiveComponentHydrator::hydrateValue() to hydrate null values [LiveComponent] fix: LiveComponentHydrator::hydrateValue() cannot hydrate null values May 13, 2025
@nikophil nikophil force-pushed the fix/allow-hydrate-null-values branch from 4c9db58 to e918dd8 Compare May 13, 2025 09:37
@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels May 13, 2025
Copy link
Member

@Kocal Kocal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Can you mention this fix in the changelog? 🙏🏻

@nikophil
Copy link
Contributor Author

nikophil commented May 13, 2025

@Kocal

will you release it in 2.24.1 or 2.25.0? just to know how I should update the changelog

@Kocal
Copy link
Member

Kocal commented May 13, 2025

2.25.0

@nikophil nikophil force-pushed the fix/allow-hydrate-null-values branch from e918dd8 to 8d88ccb Compare May 13, 2025 12:28
@nikophil
Copy link
Contributor Author

done

@Kocal
Copy link
Member

Kocal commented May 13, 2025

Thank you @nikophil.

@Kocal Kocal merged commit 9426209 into symfony:2.x May 13, 2025
77 of 86 checks passed
@Kocal Kocal added the Bug Bug Fix label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug Fix Status: Reviewed Has been reviewed by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants