Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-27290

Remove abstract on DebugTemplate to fix dumping logs in profiler

    XMLWordPrintable

    Details

      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).

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            edi.modric Edi Modrić
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: