Category : callback

I am trying to use Serialize with callbacks like in https://symfony.com/doc/current/components/serializer.html#using-callbacks-to-serialize-properties-with-object-instances . But it doesn’t seem to go into the callback. I can ignore attributes with ‘IGNORED_ATTRIBUTES’ just fine, just CALLBACKS not working. What could I be doing wrong? $dateCallback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) { ..

Read more