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

Smarty upgrade deprecates usage of PHP functions as modifiers #794

Open
Tracked by #767
stwalkerster opened this issue Apr 10, 2023 · 0 comments
Open
Tracked by #767

Smarty upgrade deprecates usage of PHP functions as modifiers #794

stwalkerster opened this issue Apr 10, 2023 · 0 comments
Labels
good first issue This task is suitable for developers new to the project

Comments

@stwalkerster
Copy link
Member

stwalkerster commented 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 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.

@stwalkerster stwalkerster added the good first issue This task is suitable for developers new to the project label Apr 10, 2023
@stwalkerster 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
@stwalkerster stwalkerster moved this to Incoming in Bugs May 29, 2024
@methecooldude methecooldude mentioned this issue Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This task is suitable for developers new to the project
Projects
Status: Incoming
Development

No branches or pull requests

1 participant