thank you for your hard work on this great bundle.
I noticed a lot of "plugin tag already registered" debug messages on a project of mine.
The project uses the Symfony AppCache and a lot of ESI's. With every ESI render() a block of this debug messages were logged.
[2016-03-18 18:43:33] SmartyBundle.DEBUG: SmartyException caught: Plugin tag "path" already registered.
[2016-03-18 18:43:33] SmartyBundle.DEBUG: SmartyException caught: Plugin tag "path" already registered.
[2016-03-18 18:43:33] SmartyBundle.DEBUG: SmartyException caught: Plugin tag "url" already registered.
[2016-03-18 18:43:33] SmartyBundle.DEBUG: SmartyException caught: Plugin tag "url" already registered.
The debug messages are caused because the method registerPlugins() is called on the method render(). registerPlugins() registers the plugins on the Smarty instance regardless if it is already registered.
My solution is to track which plugins are already registered and skip those that are being already registered. That allows to add plugins between two or more render() calls.
I would appreciate if you could merge my pull request.
thank you for your hard work on this great bundle.
I noticed a lot of "plugin tag already registered" debug messages on a project of mine. The project uses the Symfony AppCache and a lot of ESI's. With every ESI render() a block of this debug messages were logged.
The debug messages are caused because the method registerPlugins() is called on the method render(). registerPlugins() registers the plugins on the Smarty instance regardless if it is already registered.
My solution is to track which plugins are already registered and skip those that are being already registered. That allows to add plugins between two or more render() calls.
I would appreciate if you could merge my pull request.