nelmio / NelmioSecurityBundle

Adds extra security-related features in your Symfony application

Home Page:https://symfony.com/bundles/NelmioSecurityBundle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Twig 3.0 compatibility

spackmat opened this issue · comments

I just tried to upgrade a project to Twig 3.0. Which looks good so far, but the NelmioSecurityBundle still uses the \Twig_* classes removed in 3.0. For a quick test, I replaced them with their new namespaced names, which seems to work (and should work, as the old classes were only aliases since they were deprecated). Affected are only those three classes:

Nelmio\SecurityBundle\Twig\NelmioCSPTwigExtension
Nelmio\SecurityBundle\Twig\TokenParser\AbstractCSPParser
Nelmio\SecurityBundle\Twig\Node\CSPNode

I'm not familiar with the internals of the bundle, but maybe this small update could enable Twig 3.0 support and make some deprecation messages go away for older versions.

Greets
spackmat

PR #211 will solve this, so I close this issue.