- Issue created by @berdir
- Merge request !11807convert template_preprocess in system module itself β (Open) created by berdir
- π¨πSwitzerland berdir Switzerland
Started with the ones directly in the module, there are also some in test modules within system module.
template_preprocess_layout_test_2col() is tricky, because it's an indirectly defined theme hook through a library definition. We can't add an initial template on that. The question is, do we need to retain that capability, or could we just make this a regular preprocess hook? It would still be possible through a registry alter if you really need to be first. Alternatively, we would need to extend layout definitions.
- πΊπΈUnited States smustgrave
Same as the other one. Can the summary be updated about what is being deprecated exactly. Probably need a new CR.
- π¨πSwitzerland berdir Switzerland
This is just following the existing deprecation. See the meta issue. There are 100+ of these functions, we do not need a CR for all of them.
- πΊπΈUnited States smustgrave
The current CR is already published. What if all these don't make it into 11.2 (which may be a real possibility). Are we going to add deprecations to a CR post 11.2. Maybe some grouping can be done but seems like an odd order to publish the CR fully and add to it later. Seems could be confusing too.
- π¨πSwitzerland berdir Switzerland
These functions are not an API. While not explicitly listed on https://www.drupal.org/about/core/policies/core-change-policies/bc-polic... β , they are essentially hook implementations and as such excluded from the BC policy IMHO.
Core just moved thousands of hook implementations without BC in a minor release. We're providing BC for these because it's only about 100 or so, and doesn't came with the same performance concerns as regular hooks.
Some of the more common ones like container, table and block have some direct calls to them because people sometimes do funky stuff with creative reusage/inheritance of templates and their preprocess logic, but it's pretty rare.
Note that there is not a single known direct call to any of the functions being deprecated in this issue (http://codcontrib.hank.vps-private.net/search?text=template_preprocess_s...), only a handful of @see references from copy & pasted templates. Nothing changes for those templates, nothing changes for people using #theme => 'xy' in render arrays.
This is very different from plugin annotation/attributes for example, where each plugin type needed be converted on its own before you could convert them, so it was important to list which was converted when and they got their own CR or at least a grouped one per minor.
I just think it's easier to apply the same blanket deprecation message to all of them instead of discussing for every single one whether or not we want to do it.
I also just added this to the linked CR: https://www.drupal.org/node/3504125/revisions/view/13953364/13959196 β
(keeping this at needs work because there's one more in a test module that I want to update anyway)
- π¨πSwitzerland berdir Switzerland
Did that last part now, can also copy #7 into the meta issue to provide some more instructions on the approach so this an be distributed, dev days might be a good opportunity for people looking for fairly easy core tasks.
- πΊπΈUnited States smustgrave
Still not a fan of adding to a CR after itβs already published, especially if any of these donβt make it before 11.2 but wonβt ping pong them around, will leave for others to review