Skip to content

Commit c9dbea1

Browse files
committed
minor #1615 [Doc] Clarify collection hydration requirements (gremo)
This PR was merged into the 2.x branch. Discussion ---------- [Doc] Clarify collection hydration requirements | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Issues | Fix #1611 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT As explained in the related issue, this should help people that doesn't require the full webapp pack, when working with collection of DTOs (otherwise you only get a generic error _Unable to dehydrate value of type "array"_) Commits ------- 22a3427 [Doc] Clarify collection hydration requirements
2 parents a90f53d + 22a3427 commit c9dbea1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,12 @@ To work with a collection of DTOs, specify the collection type inside PHPDoc::
684684
public array $addressDtoCollection;
685685
}
686686

687+
Collection type extraction from the docblock requires the ``phpdocumentor/reflection-docblock`` library. Make sure it is installed in you application:
688+
689+
.. code-block:: terminal
690+
691+
$ composer require phpdocumentor/reflection-docblock
692+
687693
Here is how the (de)hydration of DTO objects works:
688694

689695
- All "properties" (public properties or fake properties via

0 commit comments

Comments
 (0)