From b31f6d4be578c27c7c4284b3dcbe5bf0d350eb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Sat, 15 Apr 2017 00:32:12 +0200 Subject: [PATCH 1/2] Remove abstract on DebugTemplate to fix dumping logs in profiler --- Templating/Twig/DebugTemplate.php | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Templating/Twig/DebugTemplate.php b/Templating/Twig/DebugTemplate.php index 3d9eaae..1c6feba 100644 --- a/Templating/Twig/DebugTemplate.php +++ b/Templating/Twig/DebugTemplate.php @@ -23,7 +23,7 @@ * Mainly copy/paste of eZ\Bundle\EzPublishDebugBundle\Twig\DebugTemplate, courtesy of eZ Systems AS. * Adds mapping between template name and path, to display actual used template source when using themes. */ -abstract class DebugTemplate extends Twig_Template +class DebugTemplate extends Twig_Template { /** * Map between template names and associated paths. @@ -89,4 +89,28 @@ public function display(array $context, array $blocks = array()) echo $templateResult; } } + + /** + * {@inheritdoc} + */ + public function getTemplateName() + { + return ''; + } + + /** + * {@inheritdoc} + */ + protected function doDisplay(array $context, array $blocks = array()) + { + return ''; + } + + /** + * {@inheritdoc} + */ + public function getDebugInfo() + { + return array(); + } } From 18e5e05448ab08512372e1d6a90a97b08a157c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Sat, 15 Apr 2017 00:37:25 +0200 Subject: [PATCH 2/2] Add getSource method to DebugTemplate --- Templating/Twig/DebugTemplate.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Templating/Twig/DebugTemplate.php b/Templating/Twig/DebugTemplate.php index 1c6feba..3465ecb 100644 --- a/Templating/Twig/DebugTemplate.php +++ b/Templating/Twig/DebugTemplate.php @@ -98,6 +98,14 @@ public function getTemplateName() return ''; } + /** + * {@inheritdoc} + */ + public function getSource() + { + return ''; + } + /** * {@inheritdoc} */