trigger_deprecation('symfony/serializer', '6.3', 'Not implementing the "NormalizerInterface::getSupportedTypes()" in "%s" is deprecated.',
get_debug_type($normalizer));
} } public function getSupportedTypes(?string
$format): array
{ // @deprecated remove condition in 7.0
if (!
method_exists($this->normalizer, 'getSupportedTypes'
)) { return ['*' =>
$this->normalizer instanceof CacheableSupportsMethodInterface &&
$this->normalizer->
hasCacheableSupportsMethod()];
} return $this->normalizer->
getSupportedTypes($format);
} public function normalize(mixed
$object, string
$format = null, array
$context =
[]): array|string|int|float|bool|\ArrayObject|null
{ if (!
$this->normalizer instanceof NormalizerInterface
) { throw new \
BadMethodCallException(sprintf('The "%s()" method cannot be called as nested normalizer doesn\'t implements "%s".', __METHOD__, NormalizerInterface::
class));
} $startTime =
microtime(true
);
$normalized =
$this->normalizer->
normalize($object,
$format,
$context);
$time =
microtime(true
) -
$startTime;