Details
-
Improvement
-
Resolution: Fixed
-
Low
-
1.9.0
-
None
Description
Starting with https://github.com/symfony/symfony/commit/eddecbd112c13eadac6533b39287205b90430a21 and in combination with legacy eZ templates, when an exception happens (even a silenced deprecation notice, which is converted to an exception) while rendering the template, one gets a message `Cannot instantiate abstract class eZ\Bundle\EzPublishDebugBundle\Twig\DebugTemplate` in the log, which ultimately breaks the profiler.
The issue comes from https://github.com/symfony/symfony/blob/master/src/Symfony/Component/VarDumper/Caster/ExceptionCaster.php#L201-L202, which presumes that every subclass of `Twig_Template` is instantiable.
Haven't found other way to solve this other than this. The fix is also compatible with Twig 2.0 (for when we enable it again in the repo).