public function setCircularReferenceHandler(callable $circularReferenceHandler)
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED);

        $this->defaultContext[self::CIRCULAR_REFERENCE_HANDLER] = $this->circularReferenceHandler = $circularReferenceHandler;

        return $this;
    }
public function setCircularReferenceHandler(callable $circularReferenceHandler)
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED);

        $this->defaultContext[self::CIRCULAR_REFERENCE_HANDLER] = $this->circularReferenceHandler = $circularReferenceHandler;

        return $this;
    }
public function setCircularReferenceHandler ( callable $ circularReferenceHandler ) { @ trigger_error ( sprintf ( 'The "%s()" method is deprecated since Symfony 4.2, use the "circular_reference_handler" key of the context instead.' , __METHOD__ ) , E_USER_DEPRECATED ) ; $ this -> defaultContext [ self :: CIRCULAR_REFERENCE_HANDLER ] = $ this -> circularReferenceHandler = $ circularReferenceHandler ; return $ this ; }
Sets circular reference handler.

@deprecated since Symfony 4.2

@param callable $circularReferenceHandler

@return self
Sets circular reference handler .