diff options
author | quietone <quietone@2572884.no-reply.drupal.org> | 2024-10-31 13:52:00 +1300 |
---|---|---|
committer | quietone <quietone@2572884.no-reply.drupal.org> | 2024-10-31 13:52:00 +1300 |
commit | 42c862024565dde03e52822d7986d8863b197262 (patch) | |
tree | cd5b662312366cdc3c454162aece59bd40a78703 | |
parent | e4307bdbd0ea1b1f4a2fe06d4ff75607de569cda (diff) | |
download | drupal-42c862024565dde03e52822d7986d8863b197262.tar.gz drupal-42c862024565dde03e52822d7986d8863b197262.zip |
Issue #3483057 by mstrelan, bbrala, smustgrave: Add void return type to all hook_install and hook_uninstall implementations
38 files changed, 46 insertions, 310 deletions
diff --git a/core/.phpstan-baseline.php b/core/.phpstan-baseline.php index c4baab20522..77874ce9a17 100644 --- a/core/.phpstan-baseline.php +++ b/core/.phpstan-baseline.php @@ -12534,12 +12534,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function block_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/block/block.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function block_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/block/block.install', @@ -14394,24 +14388,12 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function comment_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/comment/comment.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function comment_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/comment/comment.install', ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function comment_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/comment/comment.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function comment_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/comment/comment.install', @@ -16764,12 +16746,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function contact_storage_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function contact_storage_test_contact_form_form_builder\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/contact/tests/modules/contact_storage_test/contact_storage_test.module', @@ -17730,12 +17706,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function content_moderation_test_resave_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function content_moderation_test_resave_entity_insert\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.module', @@ -18366,12 +18336,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function content_translation_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/content_translation/content_translation.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function content_translation_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/content_translation/content_translation.install', @@ -21036,18 +21000,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function field_layout_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/field_layout/field_layout.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return - 'message' => '#^Function field_layout_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/field_layout/field_layout.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function field_layout_entity_type_alter\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/field_layout/field_layout.module', @@ -23928,24 +23880,12 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function image_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/image/image.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function image_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/image/image.install', ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function image_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/image/image.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function image_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/image/image.install', @@ -24744,12 +24684,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function jsonapi_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/jsonapi/jsonapi.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function jsonapi_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/jsonapi/jsonapi.install', @@ -26790,12 +26724,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function layout_builder_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/layout_builder/layout_builder.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function layout_builder_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/layout_builder/layout_builder.install', @@ -28638,12 +28566,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function locale_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/locale/locale.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function locale_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/locale/locale.install', @@ -28656,12 +28578,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function locale_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/locale/locale.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function locale_update_10300\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/locale/locale.install', @@ -29346,12 +29262,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function locale_test_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/locale_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function locale_test_countries_alter\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/locale/tests/modules/locale_test/locale_test.module', @@ -29652,12 +29562,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function media_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/media/media.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function media_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/media/media.install', @@ -30732,12 +30636,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function media_library_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/media_library/media_library.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function media_library_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/media_library/media_library.install', @@ -33638,12 +33536,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function migrate_drupal_ui_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/migrate_drupal_ui/migrate_drupal_ui.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function migrate_drupal_ui_help\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/migrate_drupal_ui/migrate_drupal_ui.module', @@ -34406,12 +34298,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function node_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/node/node.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function node_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/node/node.install', @@ -34424,12 +34310,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function node_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/node/node.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function node_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/node/node.install', @@ -39146,12 +39026,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function settings_tray_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/settings_tray/settings_tray.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function settings_tray_block_alter\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/settings_tray/settings_tray.module', @@ -39308,24 +39182,12 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function shortcut_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/shortcut/shortcut.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function shortcut_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/shortcut/shortcut.install', ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function shortcut_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/shortcut/shortcut.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function shortcut_help\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/shortcut/shortcut.module', @@ -39920,12 +39782,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function syslog_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/syslog/syslog.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function syslog_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/syslog/syslog.install', @@ -40754,12 +40610,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function system_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/system.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function system_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/system.install', @@ -42430,12 +42280,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function entity_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function entity_test_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/entity_test/entity_test.install', @@ -44440,12 +44284,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function hold_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/hold_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function hold_test_request\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/hold_test/hold_test.module', @@ -44739,18 +44577,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function module_handler_test_multiple_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return - 'message' => '#^Function module_handler_test_multiple_child_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function module_required_test_system_info_alter\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/module_required_test/module_required_test.module', @@ -44769,12 +44595,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function module_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function module_test_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/module_test/module_test.install', @@ -45203,12 +45023,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function router_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/router_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function router_test_preprocess_page\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/router_test_directory/router_test.module', @@ -45467,12 +45281,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function system_module_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/system_module_test/system_module_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function system_module_test_page_attachments_alter\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/system_module_test/system_module_test.module', @@ -45647,12 +45455,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function test_batch_test_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/system/tests/modules/test_batch_test/test_batch_test.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Method Drupal\\\\test_page_test\\\\Controller\\\\Test\\:\\:deprecations\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/system/tests/modules/test_page_test/src/Controller/Test.php', @@ -50243,24 +50045,12 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function update_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/update/update.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function update_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/update/update.install', ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function update_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/update/update.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function update_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/update/update.install', @@ -52019,12 +51809,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function user_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/user/user.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function user_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/user/user.install', @@ -59117,12 +58901,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function views_test_data_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/views_test_data.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function views_test_data_schema\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/views/tests/modules/views_test_data/views_test_data.install', @@ -60617,12 +60395,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function views_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/views/views.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function views_update_last_removed\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/views/views.install', @@ -63839,12 +63611,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function workspaces_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/modules/workspaces/workspaces.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function workspaces_module_preinstall\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/modules/workspaces/workspaces.install', @@ -63989,12 +63755,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function demo_umami_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function demo_umami_requirements\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/profiles/demo_umami/demo_umami.install', @@ -64031,24 +63791,12 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function demo_umami_content_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function demo_umami_content_module_preinstall\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install', ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function demo_umami_content_uninstall\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Method Drupal\\\\demo_umami_content\\\\InstallHelper\\:\\:create\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php', @@ -64253,12 +64001,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function standard_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/profiles/standard/standard.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function standard_form_install_configure_form_alter\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/profiles/standard/standard.profile', @@ -64331,12 +64073,6 @@ $ignoreErrors[] = [ ]; $ignoreErrors[] = [ // identifier: missingType.return - 'message' => '#^Function testing_site_config_install\\(\\) has no return type specified\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/profiles/testing_site_config/testing_site_config.install', -]; -$ignoreErrors[] = [ - // identifier: missingType.return 'message' => '#^Function simpletest_script_execute_batch\\(\\) has no return type specified\\.$#', 'count' => 1, 'path' => __DIR__ . '/scripts/run-tests.sh', diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php index abc3025a9bf..bfe5f5f62ba 100644 --- a/core/lib/Drupal/Core/Extension/module.api.php +++ b/core/lib/Drupal/Core/Extension/module.api.php @@ -255,7 +255,7 @@ function hook_modules_installed($modules, $is_syncing) { * @see hook_uninstall() * @see hook_modules_installed() */ -function hook_install($is_syncing) { +function hook_install($is_syncing): void { // Set general module variables. \Drupal::state()->set('my_module.foo', 'bar'); } @@ -345,7 +345,7 @@ function hook_modules_uninstalled($modules, $is_syncing) { * @see hook_modules_uninstalled() * @see \Drupal\Core\Extension\ModuleUninstallValidatorInterface */ -function hook_uninstall($is_syncing) { +function hook_uninstall($is_syncing): void { // Delete remaining general module variables. \Drupal::state()->delete('my_module.foo'); } diff --git a/core/modules/block/block.install b/core/modules/block/block.install index 0a2717dabf3..0d2e66503fe 100644 --- a/core/modules/block/block.install +++ b/core/modules/block/block.install @@ -10,7 +10,7 @@ use Drupal\Core\Cache\Cache; /** * Implements hook_install(). */ -function block_install() { +function block_install(): void { // Because the Block module upon installation unconditionally overrides all // HTML output by selecting a different page display variant, we must // invalidate all cached HTML output. diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install index 53a0c61d599..107b5a8f133 100644 --- a/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -11,7 +11,7 @@ use Drupal\field\Entity\FieldStorageConfig; /** * Implements hook_uninstall(). */ -function comment_uninstall() { +function comment_uninstall(): void { // Remove the comment fields. $storage = \Drupal::entityTypeManager()->getStorage('field_storage_config'); $fields = $storage->loadByProperties(['type' => 'comment']); @@ -24,7 +24,7 @@ function comment_uninstall() { /** * Implements hook_install(). */ -function comment_install() { +function comment_install(): void { // By default, maintain entity statistics for comments. // @see \Drupal\comment\CommentStatisticsInterface \Drupal::state()->set('comment.maintain_entity_statistics', TRUE); diff --git a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install index 1ccb97b58ad..708bbafcd62 100644 --- a/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install +++ b/core/modules/contact/tests/modules/contact_storage_test/contact_storage_test.install @@ -12,7 +12,7 @@ use Drupal\Core\Entity\Sql\SqlContentEntityStorage; /** * Implements hook_install(). */ -function contact_storage_test_install() { +function contact_storage_test_install(): void { $entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager(); $original = $entity_definition_update_manager->getEntityType('contact_message'); diff --git a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install index aad9057f446..8682af1f763 100644 --- a/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install +++ b/core/modules/content_moderation/tests/modules/content_moderation_test_resave/content_moderation_test_resave.install @@ -10,7 +10,7 @@ declare(strict_types=1); /** * Implements hook_install(). */ -function content_moderation_test_resave_install() { +function content_moderation_test_resave_install(): void { // Make sure that this module's hooks are run before Content Moderation's // hooks. module_set_weight('content_moderation_test_resave', -10); diff --git a/core/modules/content_translation/content_translation.install b/core/modules/content_translation/content_translation.install index ba67d2141eb..85571166885 100644 --- a/core/modules/content_translation/content_translation.install +++ b/core/modules/content_translation/content_translation.install @@ -11,7 +11,7 @@ use Drupal\Core\Url; /** * Implements hook_install(). */ -function content_translation_install() { +function content_translation_install(): void { // Assign a fairly low weight to ensure our implementation of // hook_module_implements_alter() is run among the last ones. module_set_weight('content_translation', 10); diff --git a/core/modules/field_layout/field_layout.install b/core/modules/field_layout/field_layout.install index 88882d39289..15c47ef968e 100644 --- a/core/modules/field_layout/field_layout.install +++ b/core/modules/field_layout/field_layout.install @@ -14,7 +14,7 @@ use Drupal\field_layout\Display\EntityDisplayWithLayoutInterface; /** * Implements hook_install(). */ -function field_layout_install() { +function field_layout_install(): void { // Ensure each entity display has a layout. $entity_save = function (EntityDisplayInterface $entity) { if ($entity instanceof EntityDisplayWithLayoutInterface) { @@ -31,7 +31,7 @@ function field_layout_install() { /** * Implements hook_uninstall(). */ -function field_layout_uninstall() { +function field_layout_uninstall(): void { // Reset each entity display to use the one-column layout to best approximate // the absence of layouts. $entity_save = function (EntityDisplayInterface $entity) { diff --git a/core/modules/image/image.install b/core/modules/image/image.install index a7e5d2fa58e..f4170dc6bc2 100644 --- a/core/modules/image/image.install +++ b/core/modules/image/image.install @@ -11,7 +11,7 @@ use Drupal\Core\File\FileSystemInterface; /** * Implements hook_install(). */ -function image_install() { +function image_install(): void { // Create the styles directory and ensure it's writable. $directory = \Drupal::config('system.file')->get('default_scheme') . '://styles'; \Drupal::service('file_system')->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS); @@ -20,7 +20,7 @@ function image_install() { /** * Implements hook_uninstall(). */ -function image_uninstall() { +function image_uninstall(): void { // Remove the styles directory and generated images. /** @var \Drupal\Core\File\FileSystemInterface $file_system */ $file_system = \Drupal::service('file_system'); diff --git a/core/modules/jsonapi/jsonapi.install b/core/modules/jsonapi/jsonapi.install index 48c0ed89aea..3cc0ee0a821 100644 --- a/core/modules/jsonapi/jsonapi.install +++ b/core/modules/jsonapi/jsonapi.install @@ -10,7 +10,7 @@ use Drupal\Core\Url; /** * Implements hook_install(). */ -function jsonapi_install() { +function jsonapi_install(): void { $module_handler = \Drupal::moduleHandler(); $potential_conflicts = [ 'content_translation', diff --git a/core/modules/layout_builder/layout_builder.install b/core/modules/layout_builder/layout_builder.install index 18df64a2fbd..2629b72c096 100644 --- a/core/modules/layout_builder/layout_builder.install +++ b/core/modules/layout_builder/layout_builder.install @@ -13,7 +13,7 @@ use Drupal\layout_builder\Section; /** * Implements hook_install(). */ -function layout_builder_install() { +function layout_builder_install(): void { $display_changed = FALSE; $displays = LayoutBuilderEntityViewDisplay::loadMultiple(); diff --git a/core/modules/locale/locale.install b/core/modules/locale/locale.install index 0b204f7103d..97422682472 100644 --- a/core/modules/locale/locale.install +++ b/core/modules/locale/locale.install @@ -13,7 +13,7 @@ use Drupal\Core\Url; /** * Implements hook_install(). */ -function locale_install() { +function locale_install(): void { // Create the interface translations directory and ensure it's writable. if (!$directory = \Drupal::config('locale.settings')->get('translation.path')) { $site_path = \Drupal::getContainer()->getParameter('site.path'); @@ -32,7 +32,7 @@ function locale_install() { /** * Implements hook_uninstall(). */ -function locale_uninstall() { +function locale_uninstall(): void { $config = \Drupal::config('locale.settings'); // Delete all JavaScript translation files. $locale_js_directory = 'public://' . $config->get('javascript.directory'); diff --git a/core/modules/locale/tests/modules/locale_test/locale_test.install b/core/modules/locale/tests/modules/locale_test/locale_test.install index d3045ec8a58..745771f22b4 100644 --- a/core/modules/locale/tests/modules/locale_test/locale_test.install +++ b/core/modules/locale/tests/modules/locale_test/locale_test.install @@ -10,7 +10,7 @@ declare(strict_types=1); /** * Implements hook_uninstall(). */ -function locale_test_uninstall() { +function locale_test_uninstall(): void { // Clear variables. \Drupal::state()->delete('locale.test_system_info_alter'); \Drupal::state()->delete('locale.test_projects_alter'); diff --git a/core/modules/media/media.install b/core/modules/media/media.install index ec43e36cb36..b901db70ebe 100644 --- a/core/modules/media/media.install +++ b/core/modules/media/media.install @@ -19,7 +19,7 @@ use Drupal\user\RoleInterface; /** * Implements hook_install(). */ -function media_install() { +function media_install(): void { $source = \Drupal::service('extension.list.module')->getPath('media') . '/images/icons'; $destination = \Drupal::config('media.settings')->get('icon_base_uri'); /** @var \Drupal\Core\File\FileSystemInterface $file_system */ diff --git a/core/modules/media_library/media_library.install b/core/modules/media_library/media_library.install index c03aa041ef4..92dbf65385e 100644 --- a/core/modules/media_library/media_library.install +++ b/core/modules/media_library/media_library.install @@ -10,7 +10,7 @@ use Drupal\media\Entity\MediaType; /** * Implements hook_install(). */ -function media_library_install($is_syncing) { +function media_library_install($is_syncing): void { if (!$is_syncing) { foreach (MediaType::loadMultiple() as $type) { _media_library_configure_form_display($type); diff --git a/core/modules/migrate_drupal_ui/migrate_drupal_ui.install b/core/modules/migrate_drupal_ui/migrate_drupal_ui.install index 5962ee1f878..e993c64205d 100644 --- a/core/modules/migrate_drupal_ui/migrate_drupal_ui.install +++ b/core/modules/migrate_drupal_ui/migrate_drupal_ui.install @@ -10,7 +10,7 @@ use Drupal\Core\Url; /** * Implements hook_install(). */ -function migrate_drupal_ui_install() { +function migrate_drupal_ui_install(): void { $url = Url::fromRoute('migrate_drupal_ui.upgrade')->toString(); \Drupal::messenger()->addStatus(t('The Migrate Drupal UI module has been enabled. Proceed to the <a href=":url">upgrade form</a>.', [':url' => $url])); } diff --git a/core/modules/node/node.install b/core/modules/node/node.install index 154ae4d9ded..85a3794b698 100644 --- a/core/modules/node/node.install +++ b/core/modules/node/node.install @@ -120,7 +120,7 @@ function node_schema() { /** * Implements hook_install(). */ -function node_install() { +function node_install(): void { // Enable default permissions for system roles. // IMPORTANT: Modules SHOULD NOT automatically grant any user role access // permissions in hook_install(). @@ -149,7 +149,7 @@ function node_install() { /** * Implements hook_uninstall(). */ -function node_uninstall() { +function node_uninstall(): void { // Delete remaining general module variables. \Drupal::state()->delete('node.node_access_needs_rebuild'); } diff --git a/core/modules/settings_tray/settings_tray.install b/core/modules/settings_tray/settings_tray.install index c1d43355c99..3aeabf00e6b 100644 --- a/core/modules/settings_tray/settings_tray.install +++ b/core/modules/settings_tray/settings_tray.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function settings_tray_install() { +function settings_tray_install(): void { // \Drupal\Core\Menu\ContextualLinkManager caches per-group definitions // without associating the cache tag that would allow them to be cleared // by its clearCachedDefinitions() implementation that is automatically diff --git a/core/modules/shortcut/shortcut.install b/core/modules/shortcut/shortcut.install index bb61278a54a..5f1dd604c35 100644 --- a/core/modules/shortcut/shortcut.install +++ b/core/modules/shortcut/shortcut.install @@ -49,7 +49,7 @@ function shortcut_schema() { /** * Implements hook_install(). */ -function shortcut_install() { +function shortcut_install(): void { // Theme settings are not configuration entities and cannot depend on modules // so to set a module-specific setting, we need to set it with logic. if (\Drupal::service('theme_handler')->themeExists('claro')) { @@ -63,7 +63,7 @@ function shortcut_install() { /** * Implements hook_uninstall(). */ -function shortcut_uninstall() { +function shortcut_uninstall(): void { // Theme settings are not configuration entities and cannot depend on modules // so to unset a module-specific setting, we need to unset it with logic. if (\Drupal::service('theme_handler')->themeExists('claro')) { diff --git a/core/modules/syslog/syslog.install b/core/modules/syslog/syslog.install index 2219bd507f2..6661887324e 100644 --- a/core/modules/syslog/syslog.install +++ b/core/modules/syslog/syslog.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function syslog_install() { +function syslog_install(): void { // The default facility setting depends on the operating system, so it needs // to be set dynamically during installation. \Drupal::configFactory()->getEditable('syslog.settings')->set('facility', defined('LOG_LOCAL0') ? LOG_LOCAL0 : LOG_USER)->save(); diff --git a/core/modules/system/system.install b/core/modules/system/system.install index 85324051c18..b903e574b5a 100644 --- a/core/modules/system/system.install +++ b/core/modules/system/system.install @@ -1618,7 +1618,7 @@ function system_requirements($phase) { /** * Implements hook_install(). */ -function system_install() { +function system_install(): void { // Populate the cron key state variable. $cron_key = Crypt::randomBytesBase64(55); \Drupal::state()->set('system.cron_key', $cron_key); diff --git a/core/modules/system/tests/modules/entity_test/entity_test.install b/core/modules/system/tests/modules/entity_test/entity_test.install index 7527384356f..667b630fc9c 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.install +++ b/core/modules/system/tests/modules/entity_test/entity_test.install @@ -13,7 +13,7 @@ use Drupal\field\Entity\FieldConfig; /** * Implements hook_install(). */ -function entity_test_install() { +function entity_test_install(): void { foreach (entity_test_entity_types() as $entity_type) { // Auto-create fields for testing. FieldStorageConfig::create([ diff --git a/core/modules/system/tests/modules/hold_test/hold_test.install b/core/modules/system/tests/modules/hold_test/hold_test.install index cc7d9045e75..64ef37da270 100644 --- a/core/modules/system/tests/modules/hold_test/hold_test.install +++ b/core/modules/system/tests/modules/hold_test/hold_test.install @@ -10,7 +10,7 @@ declare(strict_types=1); /** * Implements hook_install(). */ -function hold_test_install() { +function hold_test_install(): void { hold_test_request(FALSE); hold_test_response(FALSE); } diff --git a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install index f188d069859..c78001b255a 100644 --- a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install +++ b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple.install @@ -10,7 +10,7 @@ declare(strict_types=1); /** * Implements hook_install(). */ -function module_handler_test_multiple_install() { +function module_handler_test_multiple_install(): void { // Set weight of module. module_set_weight('module_handler_test_multiple', 1); } diff --git a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install index 01e22777100..a264dba00ef 100644 --- a/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install +++ b/core/modules/system/tests/modules/module_handler_test_multiple/module_handler_test_multiple_child/module_handler_test_multiple_child.install @@ -13,7 +13,7 @@ declare(strict_types=1); /** * Implements hook_install(). */ -function module_handler_test_multiple_child_install() { +function module_handler_test_multiple_child_install(): void { // Set weight of module. module_set_weight('module_handler_test_multiple_child', 1); } diff --git a/core/modules/system/tests/modules/module_test/module_test.install b/core/modules/system/tests/modules/module_test/module_test.install index 42ea0c45105..7c3638e88d9 100644 --- a/core/modules/system/tests/modules/module_test/module_test.install +++ b/core/modules/system/tests/modules/module_test/module_test.install @@ -31,7 +31,7 @@ function module_test_schema() { /** * Implements hook_install(). */ -function module_test_install() { +function module_test_install(): void { $schema = module_test_schema()['module_test']; Database::getConnection()->insert('module_test') ->fields([ diff --git a/core/modules/system/tests/modules/router_test_directory/router_test.install b/core/modules/system/tests/modules/router_test_directory/router_test.install index 92fb50df8c3..c87947bea13 100644 --- a/core/modules/system/tests/modules/router_test_directory/router_test.install +++ b/core/modules/system/tests/modules/router_test_directory/router_test.install @@ -12,7 +12,7 @@ use Drupal\Core\Url; /** * Implements hook_install(). */ -function router_test_install() { +function router_test_install(): void { // Ensure a URL can be generated for routes provided by the module during // installation. \Drupal::state()->set(__FUNCTION__, Url::fromRoute('router_test.1')->toString()); diff --git a/core/modules/system/tests/modules/system_module_test/system_module_test.install b/core/modules/system/tests/modules/system_module_test/system_module_test.install index 931488918a5..63aafddae4f 100644 --- a/core/modules/system/tests/modules/system_module_test/system_module_test.install +++ b/core/modules/system/tests/modules/system_module_test/system_module_test.install @@ -12,6 +12,6 @@ use Drupal\Core\Cache\Cache; /** * Implements hook_install(). */ -function system_module_test_install() { +function system_module_test_install(): void { Cache::invalidateTags(['rendered']); } diff --git a/core/modules/system/tests/modules/test_batch_test/test_batch_test.install b/core/modules/system/tests/modules/test_batch_test/test_batch_test.install index ccd805c1aae..4ddd787d15c 100644 --- a/core/modules/system/tests/modules/test_batch_test/test_batch_test.install +++ b/core/modules/system/tests/modules/test_batch_test/test_batch_test.install @@ -12,7 +12,7 @@ use Drupal\entity_test\Entity\EntityTest; /** * Implements hook_install(). */ -function test_batch_test_install() { +function test_batch_test_install(): void { $total = 2; $operations = []; for ($i = 1; $i <= $total; $i++) { diff --git a/core/modules/update/update.install b/core/modules/update/update.install index d7a95d60013..3fb6136ab70 100644 --- a/core/modules/update/update.install +++ b/core/modules/update/update.install @@ -73,7 +73,7 @@ function update_requirements($phase) { /** * Implements hook_install(). */ -function update_install() { +function update_install(): void { $queue = \Drupal::queue('update_fetch_tasks', TRUE); $queue->createQueue(); } @@ -81,7 +81,7 @@ function update_install() { /** * Implements hook_uninstall(). */ -function update_uninstall() { +function update_uninstall(): void { \Drupal::state()->delete('update.last_check'); \Drupal::state()->delete('update.last_email_notification'); diff --git a/core/modules/user/user.install b/core/modules/user/user.install index eb96432eef4..0475c47d375 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -68,7 +68,7 @@ function user_schema() { /** * Implements hook_install(). */ -function user_install() { +function user_install(): void { $storage = \Drupal::entityTypeManager()->getStorage('user'); // Insert a row for the anonymous user. $storage diff --git a/core/modules/views/tests/modules/views_test_data/views_test_data.install b/core/modules/views/tests/modules/views_test_data/views_test_data.install index 0b2df3e2511..97535ef92ec 100644 --- a/core/modules/views/tests/modules/views_test_data/views_test_data.install +++ b/core/modules/views/tests/modules/views_test_data/views_test_data.install @@ -17,7 +17,7 @@ function views_test_data_schema() { /** * Implements hook_install(). */ -function views_test_data_install() { +function views_test_data_install(): void { // Add the marquee tag to possible html elements to test the field handler. $values = [ 'div' => 'DIV', diff --git a/core/modules/views/views.install b/core/modules/views/views.install index a7ed0b99a85..cef5efae59f 100644 --- a/core/modules/views/views.install +++ b/core/modules/views/views.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function views_install() { +function views_install(): void { module_set_weight('views', 10); } diff --git a/core/modules/workspaces/workspaces.install b/core/modules/workspaces/workspaces.install index 0223678a686..96f45aad5ba 100644 --- a/core/modules/workspaces/workspaces.install +++ b/core/modules/workspaces/workspaces.install @@ -49,7 +49,7 @@ function workspaces_module_preinstall($module) { /** * Implements hook_install(). */ -function workspaces_install() { +function workspaces_install(): void { // Set the owner of these default workspaces to be first user which has the // 'administrator' role. This way we avoid hard coding user ID 1 for sites // that prefer to not give it any special meaning. diff --git a/core/profiles/demo_umami/demo_umami.install b/core/profiles/demo_umami/demo_umami.install index 5404f934a2d..1e305aec723 100644 --- a/core/profiles/demo_umami/demo_umami.install +++ b/core/profiles/demo_umami/demo_umami.install @@ -32,7 +32,7 @@ function demo_umami_requirements($phase) { * * @see system_install() */ -function demo_umami_install() { +function demo_umami_install(): void { // We install some menu links, so we have to rebuild the router, to ensure the // menu links are valid. \Drupal::service('router.builder')->rebuildIfNeeded(); diff --git a/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install b/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install index f3df9bfc6e1..3a0a986c4be 100644 --- a/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install +++ b/core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install @@ -21,7 +21,7 @@ function demo_umami_content_module_preinstall($module) { /** * Implements hook_install(). */ -function demo_umami_content_install($is_syncing) { +function demo_umami_content_install($is_syncing): void { if (!$is_syncing) { $query = \Drupal::entityQuery('node')->accessCheck(TRUE); $nids = $query->execute(); @@ -74,7 +74,7 @@ function demo_umami_content_install($is_syncing) { /** * Implements hook_uninstall(). */ -function demo_umami_content_uninstall($is_syncing) { +function demo_umami_content_uninstall($is_syncing): void { if (!$is_syncing) { \Drupal::classResolver(InstallHelper::class)->deleteImportedContent(); } diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index 6fda4647f17..635f2c2b774 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -14,7 +14,7 @@ use Drupal\shortcut\Entity\Shortcut; * * @see system_install() */ -function standard_install() { +function standard_install(): void { // Populate the default shortcut set. $shortcut = Shortcut::create([ 'shortcut_set' => 'default', diff --git a/core/profiles/testing_site_config/testing_site_config.install b/core/profiles/testing_site_config/testing_site_config.install index 0f718d0b8f4..548ff02b40d 100644 --- a/core/profiles/testing_site_config/testing_site_config.install +++ b/core/profiles/testing_site_config/testing_site_config.install @@ -8,7 +8,7 @@ /** * Implements hook_install(). */ -function testing_site_config_install() { +function testing_site_config_install(): void { // Set the site email address to something that is not sendmail_from. \Drupal::configFactory()->getEditable('system.site') ->set('mail', 'profile-testing-site-config@example.com') |