It's all in the title.
Issue fork domain_theme_switch-3574050
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:
It's all in the title.
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
Comment #2
mably commentedComment #3
mably commentedHere is a patch that addresses the OOP hooks conversion, adds comprehensive functional tests, and fixes a bug discovered during testing.
OOP Hooks Conversion
src/Hook/DomainThemeSwitchHooks.phpwith#[Hook('help')]attribute andStringTranslationTraitdomain_theme_switch.services.ymlto register the hook class as a servicedomain_theme_switch.modulewith#[LegacyHook]delegation for Drupal 10.6 backward compatibilityBug Fix in DomainThemeSwitchConfigForm::submitForm()
Discovered during testing: when enabling a theme override for the first time,
$domain_collection->read('system.theme')returns FALSE (no config exists in the domain collection yet). The code was trying to access['default']and['admin']on FALSE, causing PHP warnings. Fixed by falling back to the basesystem.themeconfig when no domain override exists yet.Functional Tests — 7 test methods, 87 assertions
Created
tests/src/Functional/DomainThemeSwitchFormTest.phpextendingDomainTestBasewith full coverage of the configuration form:Comment #5
mably commentedComment #7
mably commented