fallbackConstructor = $fallbackConstructor; } /** * {@inheritdoc} */ public function construct(DeserializationVisitorInterface $visitor, ClassMetadata $metadata, $data, array $type, DeserializationContext $context): ?object { if ($context->hasAttribute('target') && 1 === $context->getDepth()) { return $context->getAttribute('target'); } return $this->fallbackConstructor->construct($visitor, $metadata, $data, $type, $context); } }