Skip to content

Commit 36520c9

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Update serializer.rst
2 parents 5c4bccc + 6e5f041 commit 36520c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/serializer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ When serializing, you can set a callback to format a specific object property::
655655
$encoder = new JsonEncoder();
656656

657657
// all callback parameters are optional (you can omit the ones you don't use)
658-
$dateCallback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) {
658+
$callback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) {
659659
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
660660
};
661661

0 commit comments

Comments
 (0)