Skip to content

Commit 6e5f041

Browse files
committed
Merge branch '4.2' into 4.3
* 4.2: Update serializer.rst
2 parents 924454d + 6595d11 commit 6e5f041

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)