Skip to content

Commit a75ae9a

Browse files
committed
Merge branch '5.4' into 6.4
* 5.4: Fix #20080
2 parents f907cd4 + d8d38bc commit a75ae9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/serializer.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -752,8 +752,8 @@ When serializing, you can set a callback to format a specific object property::
752752
$encoder = new JsonEncoder();
753753

754754
// all callback parameters are optional (you can omit the ones you don't use)
755-
$dateCallback = function (object $innerObject, object $outerObject, string $attributeName, ?string $format = null, array $context = []): string {
756-
return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ATOM) : '';
755+
$dateCallback = function (object $attributeValue, object $object, string $attributeName, ?string $format = null, array $context = []): string {
756+
return $attributeValue instanceof \DateTime ? $attributeValue->format(\DateTime::ATOM) : '';
757757
};
758758

759759
$defaultContext = [

0 commit comments

Comments
 (0)