From 2e0bdd0ee8c4502279e357a8d7c587e1026323ea Mon Sep 17 00:00:00 2001 From: Matthieu Lempereur Date: Wed, 18 Feb 2026 06:30:12 +0100 Subject: [PATCH 1/2] [LiveComponent] Update doc for component initialization --- src/LiveComponent/doc/index.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/LiveComponent/doc/index.rst b/src/LiveComponent/doc/index.rst index a7ec0652a5c..3a29dc8174c 100644 --- a/src/LiveComponent/doc/index.rst +++ b/src/LiveComponent/doc/index.rst @@ -525,6 +525,17 @@ Doctrine entity objects are a special case for ``LiveProp``:: public Post $post; } +.. note:: + + If you have a ``mount`` method declared in your component, it's required to + manually hydrate the prop:: + + public function mount(Post $post) + { + $this->post = $post; + // .. doing something + } + If the ``Post`` object is persisted, its dehydrated to the entity's ``id`` and then hydrated back by querying the database. If the object is unpersisted, it's dehydrated to an empty array, then hydrated back by creating an *empty* object From 215733c924856e4f677b909ec568571111573b2b Mon Sep 17 00:00:00 2001 From: Matthieu Lempereur Date: Sat, 21 Feb 2026 09:08:36 +0100 Subject: [PATCH 2/2] rewrite --- src/LiveComponent/doc/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LiveComponent/doc/index.rst b/src/LiveComponent/doc/index.rst index 3a29dc8174c..1824273c6ac 100644 --- a/src/LiveComponent/doc/index.rst +++ b/src/LiveComponent/doc/index.rst @@ -527,8 +527,8 @@ Doctrine entity objects are a special case for ``LiveProp``:: .. note:: - If you have a ``mount`` method declared in your component, it's required to - manually hydrate the prop:: + If you're using entities as ``LiveProp`` and having a ``mount`` method declared in + your component, it's required to manually hydrate the corresponding prop:: public function mount(Post $post) {