- Issue created by @nicxvan
- π¨πSwitzerland berdir Switzerland
I'm not sure what the purpose of this issue is. We will deprecate the concept of autoloading inc files for hooks as part of π Deprecate hook_hook_info() Active , but do we really need to do more?
While discouraged and not really serving a purpose, if you load them manually, it's not really an issue? I think this would essentially deprecate \Drupal\Core\Extension\ModuleHandlerInterface::loadInclude(), but for that we IMHO need to get rid of .install too, which is quite a big thing and not really that urgent?
- πΊπΈUnited States nicxvan
Yeah, this was cause there are some wider things for deprecating hook_hook_info. This might become unnecessary though.
- π³πΏNew Zealand quietone
There is an existing meta for replacing include files, π± [META] Provide modern replacements for and deprecate the legacy include files Active
- π¨πSwitzerland berdir Switzerland
That meta is for the non-module includes folder. IMHO this is either a duplicate of deprecating hook_hook_info() (which itself now is kind of a duplicate of deprecating legacy hooks) or it's a fairly-far-future deprecation of ModuleHandler::loadInclude()
- πΊπΈUnited States nicxvan
@berdir is mostly correct. The one additional thing I might consider here are child tasks to eliminate module .inc files.
They used to be useful from a pure organization standpoint, but now many have just a couple preprocess functions and with the .module files so much shorter it may make sense to consolidate some.
This title may be better called something like evaluate core .inc files in modules.
- πΊπΈUnited States nicxvan
I've attached two files.
One with module and test .inc file functions
One with core/includes .inc file functionsI've also updated the proposed resolution.
I'm confident we can and should do the section for helpers, the other sections I'm as convinced it's worth changing. - πΊπΈUnited States nicxvan
A specific example is: _content_translation_form_language_content_settings_form_alter
It's marked as proxied, which I don't know what the purpose of that is in this context, but that seems like it should be easily moved to:
ContentTranslationHooks