Skip to content

Commit 36b6a1c

Browse files
committed
minor #1133 2.12 changelog & DTO hydration docs tweaks (weaverryan)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- 2.12 changelog & DTO hydration docs tweaks | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Tickets | None | License | MIT CHANGELOG is up to date now as of this moment. I may merge a few more things - but release soon. Commits ------- aa04c5f 2.12 changelog & DTO hydration docs tweaks
2 parents db0b769 + aa04c5f commit 36b6a1c

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

src/LiveComponent/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
## 2.12.0
44

5-
- Add `onUpdated` hook for `LiveProp`
5+
- Add support for (de)hydrating DTO classes in `LiveProp`.
6+
- Fixed `emit()` method of `TestLiveComponent` to properly test events.
7+
- Add `actionAs()` to `TestLiveComponent`.
8+
- Fixed rendering bug when using Chrome's translation feature.
9+
- Add `onUpdated()` hook for `LiveProp`.
10+
- Fix support for Alpine.js & live components.
611

712
## 2.11.0
813

src/LiveComponent/doc/index.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,9 @@ persisted entities, which dehydrate to an ``id``).
625625
Using DTO's on a LiveProp
626626
~~~~~~~~~~~~~~~~~~~~~~~~~
627627

628-
.. versionadded:: 2.11
628+
.. versionadded:: 2.12
629629

630-
The automatic (de)hydration of DTO objects was introduced in LiveComponents 2.11.
630+
The automatic (de)hydration of DTO objects was introduced in LiveComponents 2.12.
631631

632632
You can also use a DTO (i.e. data transfer object / any simple class) with LiveProp as long as the property has the correct type::
633633

@@ -648,13 +648,15 @@ To work with a collection of DTOs, specify the collection type inside PHPDoc::
648648

649649
Here is how the (de)hydration of DTO objects works:
650650

651-
- It finds all properties on your DTO that are readable and writable and dehydrates each one.
652-
- the PropertyAccess component is used, which means getter and setter methods are supported, in addition to public properties.
651+
- All "properties" (public properties or fake properties via
652+
getter/setter methods) are read & dehydrated. If a property is settable
653+
but not gettable (or vice versa), an error will be thrown.
654+
- The PropertyAccess component is used to get/set the value, which means
655+
getter and setter methods are supported, in addition to public properties.
653656
- The DTO cannot have any constructor arguments.
654657

655-
If this solution doesn't feat your need
656-
657-
there are two others options to make this work:
658+
If this solution doesn't fit your need there are two others options to
659+
make this work:
658660

659661
Hydrating with the Serializer
660662
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/TogglePassword/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.12.0
4+
5+
- Added default values for the Stimulus controller values.
6+
37
## 2.11.0
48

59
- Introduce component!

src/TwigComponent/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 2.12.0
4+
5+
- Added a `debug:twig-component` command.
6+
- Fixed bad exception when the error comes from a Twig template.
7+
- Fixed deprecation with `TemplateCacheWarmer` return type.
8+
39
## 2.11.0
410

511
- Support ...spread operator with html syntax (requires Twig 3.7.0 or higher)

0 commit comments

Comments
 (0)