For some time we've been talking about moving away from preprocess - via Twig autoescape and other things. This didn't really happen to the extent people hoped during the 8.x cycle though.
So at this point we have a lot of preprocess implementations, and a lot of templates relying on variables prepared by them.
We can't remove preprocess in 8.x, and we can't make variables that were previously available to templates unavailable.
However, we can potentially rationalize specific preprocess implementations, deprecate the use of particular variables etc.
template_preprocess() gets called for every single template render, to generate exactly the same variables to pass in - this would be a good candidate to remove.
Additionally we may be able to define twig variables as objects for other things, so that they're used on demand in the template, rather than always generating strings in preprocess as we currently do. Something like node $submitted would be a good candidate for that.
Replace the variables added by template_preprocess() with Twig global variables: http://symfony.com/doc/current/cookbook/templating/global_variables.html
Active
11.0 🔥
Last updated
It affects performance. It is often combined with the Needs profiling tag.
It may affect performance, and thus requires in-depth technical reviews and profiling.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.