public function setMaxDepthHandler(?callable $handler): void
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "max_depth_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED);

        $this->maxDepthHandler = $handler;
    }
public function setMaxDepthHandler(?callable $handler): void
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "max_depth_handler" key of the context instead.', __METHOD__), E_USER_DEPRECATED);

        $this->maxDepthHandler = $handler;
    }
public function setMaxDepthHandler ( ? callable $ handler ) : void { @ trigger_error ( sprintf ( 'The "%s()" method is deprecated since Symfony 4.2, use the "max_depth_handler" key of the context instead.' , __METHOD__ ) , E_USER_DEPRECATED ) ; $ this -> maxDepthHandler = $ handler ; }
Sets a handler function that will be called when the max depth is reached.

@deprecated since Symfony 4.2
Sets a handler function that will be called when the max depth is reached .