Problem/Motivation

.theme, .module, and soon .profile file extensions have been deprecated. There is a lot of code supporting these, we should identify what code can be dropped once we remove support.

Some is called so often we can't truly deprecate it.

Attributes

  • LegacyHook
  • ProceduralCall
  • LegacyRequirementsHook
  • ProceduralHookScanStop
  • ExtensionFileIsConverted

Container parameter

  • skip_procedural_hook_scan

HookCollectorBase

  • $procedural_files

HookCollectorPass and ThemeHookCollectorPass

  • $proceduralFileExtensions
  • $proceduralImplementations
  • $procedural_files
  • checkForProceduralOnlyHooks
  • addProceduralImplementation
  • $staticDenyHooks
  • getThemeListPattern
  • getModuleListPattern
  • $deprecatedThemeFiles

ModuleHandler

  • $loadedFiles
  • $loaded
  • load
  • loadAll
  • reload
  • isLoaded
  • legacyInvoke

ThemeInitialization

  • loadActiveTheme

Extension

  • $filename
  • getExtensionPathname
  • getExtensionFilename
  • load

ThemeRegistry is loaded
Registry is loaded

Tests that need a closer look:
core/modules/user/tests/src/Kernel/UserMailNotifyTest.php
Drupal\Tests\help\Functional\HelpTopicTranslation
Drupal\Tests\package_manager\Kernel\SupportedReleaseValidator
Schema loading in kernel tests

public static function getTablesSpecification(ModuleHandlerInterface $handler, string $module): Schema|array {
if ($handler->loadInclude($module, 'install')) {
$schema = $handler->invoke($module, 'schema') ?? [];

# Delete folders

  • core/modules/system/tests/modules/hook_collector_on_behalf_procedural
  • core/modules/system/tests/modules/legacy_hook_test
  • core/modules/system/tests/modules/hook_collector_skip_procedural
  • core/modules/system/tests/modules/module_test_procedural_preprocess
  • core/modules/system/tests/modules/container_initialize
  • core/modules/system/tests/modules/hook_collector_skip_procedural_attribute
  • core/tests/Drupal/Tests/core/Extension/modules/module_handler_test_all2
  • core/tests/Drupal/Tests/core/Extension/modules/module_handler_test_all1
  • core/tests/Drupal/Tests/core/Extension/modules/module_handler_test_added

# Delete files

  • core/modules/editor/editor.admin.inc
  • core/modules/field/field.purge.inc
  • core/modules/locale/locale.batch.inc
  • core/modules/locale/locale.compare.inc
  • core/modules/locale/locale.fetch.inc
  • core/modules/locale/locale.bulk.inc
  • core/modules/locale/locale.translation.inc
  • core/modules/views_ui/admin.inc
  • core/modules/update/update.compare.inc
  • core/tests/Drupal/Tests/core/Extension/modules/module_handler_test/module_handler_test.module
  • core/modules/system/tests/modules/module_autoload_test/module_autoload_test.module
  • core/modules/system/tests/modules/HookOrder/aaa_hook_order_test/aaa_hook_order_test.module
  • core/modules/system/tests/modules/HookOrder/ccc_hook_order_test/ccc_hook_order_test.module
  • core/modules/system/tests/modules/HookOrder/ddd_hook_order_test/ddd_hook_order_test.module
  • core/modules/system/tests/modules/HookOrder/bbb_hook_order_test/bbb_hook_order_test.module
  • core/modules/menu_ui/menu_ui.module
  • core/modules/user/user.module
  • core/modules/editor/editor.module
  • core/modules/taxonomy/taxonomy.module
  • core/modules/block/block.module
  • core/modules/text/text.module
  • core/modules/system/system.module
  • core/modules/image/image.module
  • core/modules/filter/filter.module
  • core/modules/field/field.module
  • core/modules/jsonapi/jsonapi.module
  • core/modules/dblog/dblog.module
  • core/modules/locale/locale.module
  • core/modules/comment/comment.module
  • core/modules/language/language.module
  • core/modules/node/node.module
  • core/modules/views/views.module
  • core/modules/content_translation/content_translation.module
  • core/modules/syslog/syslog.module
  • core/modules/file/file.module
  • core/modules/options/options.module
  • core/modules/update/update.module
  • core/modules/automated_cron/automated_cron.module
  • core/profiles/tests/testing_hooks/testing_hooks.profile

Steps to reproduce

N/A

Proposed resolution

Determine what needs to have a trigger_error
Create test MR to just remove it

Remaining tasks

Discuss

User interface changes

N/A

Introduced terminology

N/A

API changes

...

Data model changes

N/A

Release notes snippet

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes
nicxvan’s picture

Issue summary: View changes