Ok so the problem will be the same on the PageBundle or any bundles using a persistency layer. Why not adding a dependency to DoctrineCommon to be used in the TwigExtension and remove the ``getClass`` here.

This method does not feel right here.