Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove abstract on DebugTemplate to fix dumping logs in profiler #24

Merged
merged 2 commits into from Apr 15, 2017

Conversation

emodric
Copy link
Collaborator

@emodric emodric commented Apr 14, 2017

Starting with symfony/symfony@eddecbd 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 Lolautruche\EzCoreExtraBundle\Templating\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#L166-L167, 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.

@lolautruche lolautruche merged commit d9c8fef into lolautruche:master Apr 15, 2017
@lolautruche
Copy link
Owner

Thanks @emodric

@emodric
Copy link
Collaborator Author

emodric commented Apr 16, 2017

Thank you! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants