You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The next major release of Smarty will deprecate usage of real PHP functions as template modifiers.
From a quick scan of our code, it seems that most of our use of modifiers is either using Smarty built-in modifiers (eg escape, default), or Smarty plugins.
One (known) exception is team/user.tpl, which uses implode. We need to:
Double check the codebase for other instances of unregistered modifiers
Register any unregistered modifiers properly with Smarty
In the case of implode, I think we can get away with creating a new Smarty plugin to wrap the PHP implode(...) function into a modifier.
Reproduction: Enable PHP notices in your development environment, and browse to /internal.php/team. Observe the deprecation notice in the PHP log.
Testing: Browse to any affected pages, check that the page output is unchanged, and that no deprecation notices are written to the PHP log.
The text was updated successfully, but these errors were encountered:
stwalkerster
changed the title
Smarty upgrade deprecates usage of PHP functions as modifiers (smarty-php/smarty#813) - team/user.tpl uses implode
Smarty upgrade deprecates usage of PHP functions as modifiers
Apr 10, 2023
The next major release of Smarty will deprecate usage of real PHP functions as template modifiers.
From a quick scan of our code, it seems that most of our use of modifiers is either using Smarty built-in modifiers (eg
escape
,default
), or Smarty plugins.One (known) exception is
team/user.tpl
, which usesimplode
. We need to:In the case of
implode
, I think we can get away with creating a new Smarty plugin to wrap the PHPimplode(...)
function into a modifier.Reproduction: Enable PHP notices in your development environment, and browse to
/internal.php/team
. Observe the deprecation notice in the PHP log.Testing: Browse to any affected pages, check that the page output is unchanged, and that no deprecation notices are written to the PHP log.
The text was updated successfully, but these errors were encountered: