Skip to content

Commit f0c591f

Browse files
committed
minor #18798 [Serializer] Fix Serializer context configuration in YAML (wuchen90)
This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] Fix Serializer context configuration in YAML <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> See the code of v5.4: https://github.com/symfony/symfony/blob/fcb754a1c08ef0b283f1f0caf0c8666098cb7fb6/src/Symfony/Component/Serializer/Mapping/Loader/YamlFileLoader.php#L105-L119 Commits ------- dc67e90 Fix Serializer context configuration in YAML
2 parents c3b7325 + dc67e90 commit f0c591f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serializer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ You can also specify the context on a per-property basis::
212212
App\Model\Person:
213213
attributes:
214214
createdAt:
215-
context:
216-
datetime_format: 'Y-m-d'
215+
contexts:
216+
- { context: { datetime_format: 'Y-m-d' } }
217217
218218
.. code-block:: xml
219219

0 commit comments

Comments
 (0)