- Issue created by @berdir
- 🇨ðŸ‡Switzerland berdir Switzerland
I was tempted to also move form_select_options() as it's a function that in core is only used from template_preprocess_select(), but there are direct calls in contrib, so we might want to move it to FormHelper or so and that is then definitely out of scope.
Similar with form_get_options(), which is actually not called at all in core or contrib and I think we should deprecate that without replacement.
Beside those two, the only thing left in form.inc is then batch functions.
- 🇺🇸United States nicxvan
I have done a partial review:
I've confirmed all deprecations are 11.3 -> 12
All are __function__
All functions call the right method
All initial preprocess call the right method
All comments point to the new methodNeed to run the git command to confirm the body of the methods align.
- 🇺🇸United States nicxvan
Ok I had a chance to finish my review with:
git diff 11.x --color-moved=dimmed_zebra --color-moved-ws=ignore-all-space
See #3518822-14: Convert template preprocess hooks in core/includes/theme.inc → for an explanation.With that and my review above this is RTBC.
The only line length changes for Codesniff are the comment in the media module.
- 🇦🇺Australia mstrelan
Sorry if I've missed something but why are we deprecating functions that never existed before? Any how come the originals have been renamed? I've definitely seen a template_preprocess function called directly before, even if that seems like a bad idea.
- 🇬🇧United Kingdom catch
No it's me that missed something - completely missed the double underscore being added here. Reverted for now, and yeah same question as #9 - I can understand deprecating the functions given people do call them from contrib, but for that to work they can't be renamed.
- 🇺🇸United States nicxvan
Yeah I missed that too, I'll add that to my checklist for these conversions.
- 🇺🇸United States nicxvan
nicxvan → changed the visibility of the branch 3534334-convert-templatepreprocess-in to active.
- 🇺🇸United States nicxvan
Ok I reopened the mr and provided suggestions for all of the functions.
- 🇦🇺Australia mstrelan
Changes look good to me.
FYI @libbna when there are suggestions on an MR you can just click "apply suggestion" and it will create a commit for you. You can also batch them up and apply them in a single commit too.
- 🇨ðŸ‡Switzerland berdir Switzerland
Sorry about this. I used some multi-line search & replace trickery to add the @deprecated to all template function in form.inc and that resulted in the extra _. Thanks for noticing and fixing it up.
- 🇮🇳India libbna New Delhi, India
Got it, @mstrelan — I’ll be mindful of this going ahead. Thanks!
The Needs Review Queue Bot → tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇨ðŸ‡Switzerland berdir Switzerland
Rebased, the media preprocess hook moved to MediaThemeHooks.
Automatically closed - issue fixed for 2 weeks with no activity.