It's all in the title.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

Here is a patch that converts all hook implementations across the domain_extras package to OOP format.

Converted Modules (4 sub-modules, 5 hooks)

domain_alias_extras — 1 hook

  • hook_domain_config_ui_disallowed_routes_alter -> DomainAliasExtrasHooks::domainConfigUiDisallowedRoutesAlter()

domain_access_linkit — 1 hook

  • hook_node_grants_alter -> DomainAccessLinkitHooks::nodeGrantsAlter()

domain_maintenance — 2 hooks + 2 form handlers

  • hook_form_system_site_maintenance_mode_alter -> DomainMaintenanceHooks::formSystemSiteMaintenanceModeAlter()
  • hook_domain_delete -> DomainMaintenanceHooks::domainDelete()
  • Form validate/submit handlers converted to static methods (validateForm(), submitForm()) referenced as [self::class, 'method']

domain_sso_admin_toolbar — 1 hook

  • hook_toolbar_alter -> DomainSsoAdminToolbarHooks::toolbarAlter() with injected current_user, entity_type.manager, and domain.negotiation_context services

For each module

  • Created src/Hook/*Hooks.php with #[Hook] attributes
  • Created or updated *.services.yml with service definitions
  • Updated .module files with #[LegacyHook] delegations for Drupal 10.6 backward compatibility

Tests

All 11 existing tests pass (95 assertions) across 4 test suites: domain_access_linkit kernel test, domain_maintenance functional test, domain_sso functional test, and domain_sso_admin_toolbar functional tests (8 methods).

  • mably committed 1a3b0e26 on 3.x
    task: #3574072 Convert all hooks to OOP format
    
    By: mably
    
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.