Skip to content

[#2422] Added 'reroute_email' module with environment-based settings.#2431

Merged
AlexSkrypnyk merged 1 commit intomainfrom
feature/2422-reroute-email
Mar 29, 2026
Merged

[#2422] Added 'reroute_email' module with environment-based settings.#2431
AlexSkrypnyk merged 1 commit intomainfrom
feature/2422-reroute-email

Conversation

@AlexSkrypnyk
Copy link
Copy Markdown
Member

@AlexSkrypnyk AlexSkrypnyk commented Mar 26, 2026

Closes #2422

Summary

Added the reroute_email Drupal module as a project dependency with environment-aware settings. Email rerouting is enabled automatically in non-production environments (dev, PR/custom environments) and disabled in local, CI, stage, and production. The reroute address and allowed-sender list are configurable via environment variables, with sensible defaults.

Changes

New settings file (web/sites/default/includes/modules/settings.reroute_email.php):

  • Sets reroute_email.settings for address and allowed from env vars DRUPAL_REROUTE_EMAIL_ADDRESS / DRUPAL_REROUTE_EMAIL_ALLOWED, falling back to webmaster@your-site-domain.example / *@your-site-domain.example.
  • Enables rerouting in all environments except local, ci, stage, and prod (i.e., active for dev and any custom/PR environments).
  • Supports DRUPAL_REROUTE_EMAIL_DISABLED=1 to force-disable rerouting in any environment.

Composer (composer.json):

  • Added drupal/reroute_email: ^2.3 as a project dependency.

Installer (.vortex/installer/src/Prompts/Handlers/Modules.php):

  • Registered reroute_email as a selectable module option in the Vortex installer.

Provision script (scripts/custom/provision-10-example.sh):

  • Added reroute_email to the drush pm:install list for dev/stage/CI/local environments.

Tests (tests/phpunit/Drupal/EnvironmentSettingsTest.php, SwitchableSettingsTest.php):

  • Added reroute_email.settings assertions to all environment scenarios in EnvironmentSettingsTest.
  • Added testRerouteEmail with full data provider in SwitchableSettingsTest covering: local (off), CI (off), dev (on), SUT (on), stage (off), prod (off), DRUPAL_REROUTE_EMAIL_DISABLED override, custom address/allowed, and edge cases for empty/zero/string disable values.

Before / After

Before:
┌─────────────────────────────────────────────────────────┐
│  All environments                                        │
│  Emails sent directly to recipients with no rerouting   │
└─────────────────────────────────────────────────────────┘

After:
┌───────────────────────────────────────────────────────────────┐
│  Environment        │  Rerouting enabled?                      │
│─────────────────────┼──────────────────────────────────────────│
│  local              │  No (emails not rerouted)                │
│  ci                 │  No (emails not rerouted)                │
│  dev                │  Yes → webmaster@your-site-domain.example│
│  sut / PR envs      │  Yes → webmaster@your-site-domain.example│
│  stage              │  No (emails not rerouted)                │
│  prod               │  No (emails not rerouted)                │
│─────────────────────┴──────────────────────────────────────────│
│  DRUPAL_REROUTE_EMAIL_DISABLED=1  → forces off in any env      │
│  DRUPAL_REROUTE_EMAIL_ADDRESS     → overrides reroute address  │
│  DRUPAL_REROUTE_EMAIL_ALLOWED     → overrides allowed list     │
└────────────────────────────────────────────────────────────────┘

Summary by CodeRabbit

  • New Features

    • Email rerouting module added — configurable per environment with custom target address and allowed recipients, explicit disable switch, and environment-aware defaults.
  • Tests

    • New and updated tests covering environment-based defaults, env var overrides, and enable/disable behavior across environments.
  • Documentation

    • Docs updated to document the module, settings, and examples.
  • Chores

    • Added module dependency and updated provisioning and installer discovery to include the new module.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Walkthrough

Adds the Reroute Email Drupal module: registers it in the installer prompts, adds composer dependency, updates provisioning scripts and tests, introduces an environment-aware settings include, and extends PHPUnit/Bats tests to validate configuration and discovery.

Changes

Cohort / File(s) Summary
Installer & dependency
​.vortex/installer/src/Prompts/Handlers/Modules.php, composer.json
Register reroute_email in available modules and add drupal/reroute_email ^2.3@RC to composer require.
Provisioning scripts & CI tests
scripts/custom/provision-10-example.sh, .vortex/tests/bats/unit/provision.bats
Replace redirect with reroute_email in the contrib module install list expected/installed by provisioning script and related bats tests.
Runtime settings include
web/sites/default/includes/modules/settings.reroute_email.php
New settings include that configures reroute_email.settings from env vars, defaults address/allowed, enables rerouting per-environment, and supports a hard disable via DRUPAL_REROUTE_EMAIL_DISABLED.
PHPUnit tests
tests/phpunit/Drupal/EnvironmentSettingsTest.php, tests/phpunit/Drupal/SwitchableSettingsTest.php
Add assertions for reroute_email.settings across environment tests; new data-driven testRerouteEmail() and dataProviderRerouteEmail() for env defaults and env-var overrides.
Installer tests (discovery)
.vortex/installer/tests/Unit/Handlers/ModulesHandlerDiscoveryTest.php
Include drupal/reroute_email in the composer dependency dataset used by module-discovery tests.
Docs
.vortex/docs/content/drupal/README.mdx, .vortex/docs/content/drupal/settings.mdx, .vortex/docs/content/features.mdx
Document the Reroute Email module in included modules, settings documentation (examples and env vars), and features list.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

AUTOMERGE

Poem

🐇 I nibble configs, hop through code so spry,
Capturing mail before it flies awry.
Env vars guide where every message goes,
Devs can test while production safely knows.
A tiny hop — inboxes kept dry. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding the reroute_email module with environment-based configuration settings.
Linked Issues check ✅ Passed The PR successfully implements all coding objectives from #2422: creates settings.reroute_email.php with required defaults, implements environment-based enable logic, and adds comprehensive supporting code including composer dependency, installer registration, provisioning, and extensive tests.
Out of Scope Changes check ✅ Passed All changes are within scope: the PR adds the reroute_email module infrastructure, extends tests and documentation, and includes an additional DRUPAL_REROUTE_EMAIL_DISABLED override mechanism that reasonably extends the base requirement.
Docstring Coverage ✅ Passed Docstring coverage is 95.24% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/2422-reroute-email

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.24%. Comparing base (9a00092) to head (5a7ca6c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2431      +/-   ##
==========================================
- Coverage   79.71%   79.24%   -0.47%     
==========================================
  Files         127      120       -7     
  Lines        6831     6673     -158     
  Branches       44        0      -44     
==========================================
- Hits         5445     5288     -157     
+ Misses       1386     1385       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

2 similar comments
@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk

This comment has been minimized.

@AlexSkrypnyk AlexSkrypnyk force-pushed the feature/2422-reroute-email branch from 5a7ca6c to 40d0f2e Compare March 28, 2026 05:36
@AlexSkrypnyk AlexSkrypnyk enabled auto-merge (rebase) March 28, 2026 05:37
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.vortex/docs/content/drupal/settings.mdx:
- Around line 305-317: Update the environment behavior table to explicitly
reflect the sentence "Rerouting is also enabled in any custom environments
(e.g., PR environments)..." by either adding a new row labeled "Custom/PR" with
"Rerouting enabled: Yes" and a short reason ("Prevents accidental delivery in
ephemeral PR environments"), or add a clear footnote below the table referencing
that additional non-standard environments enable rerouting; ensure the table and
the existing sentence remain consistent (same wording for "Rerouting enabled")
so readers see the behaviour both in the table and in the explanatory line.

In `@composer.json`:
- Line 25: The composer dependency "drupal/reroute_email" is pinned to a
release-candidate with the constraint "^2.3@RC"; change it to a stable
constraint such as "^2.2" for production, or if you intentionally need the RC,
add a comment in composer.json and confirm the requirement, and when the 2.3
stable is released remove the "@RC" from "^2.3@RC" so Composer can auto-upgrade.

In `@tests/phpunit/Drupal/SwitchableSettingsTest.php`:
- Around line 701-822: Add a test case in dataProviderRerouteEmail to cover
unknown/custom environments (e.g., "pr-123") so PR-environment behavior is
locked in; specifically add a yield entry using the environment string "pr-123"
(or a constant representing a custom env) with an empty env vars array and an
expected settings array containing 'reroute_email.settings' => ['enable' =>
TRUE] to ensure custom envs enable reroute_email by default. Locate
dataProviderRerouteEmail in SwitchableSettingsTest and append this yield
alongside the other environment cases.

In `@web/sites/default/includes/modules/settings.reroute_email.php`:
- Around line 10-13: Add a default empty roles override to the reroute_email
settings so stale role-based config isn't preserved; update the config array by
setting config['reroute_email.settings']['roles'] to the environment value or an
empty string (e.g., use getenv('DRUPAL_REROUTE_EMAIL_ROLES') ?: '') so the key
exists and defaults to '' when not provided, alongside the existing address and
allowed entries.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a60888ab-79e6-4c70-a158-ea4e9a1d716a

📥 Commits

Reviewing files that changed from the base of the PR and between 5a7ca6c and 40d0f2e.

⛔ Files ignored due to path filters (105)
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/_baseline/web/sites/default/includes/modules/settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/ciprovider_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/custom_modules_search_without_solr/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_all_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deploy_types_none_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/deps_updates_provider_ci_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/docroot/sites/default/includes/modules/settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_acquia/web/sites/default/includes/modules/-settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/docroot/sites/default/includes/modules/settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___acquia/web/sites/default/includes/modules/-settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/hosting_project_name___lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_disabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_disabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_acquia/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_container_registry/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_ftp/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_s3/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_download_source_url/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/migration_enabled_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_admin_toolbar/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_coffee/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_split/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_config_update/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_environment_indicator/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_pathauto/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_redirect/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_robotstxt/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_seckit_shield_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_shield/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_shield/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_shield/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_no_stage_file_proxy/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/modules_none/web/sites/default/includes/modules/-settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/tests/phpunit/Drupal/SwitchableSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/names/web/sites/default/includes/modules/settings.reroute_email.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/non_interactive_config_file/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/provision_database_lagoon/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_redis/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_redis/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_no_solr/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_none/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/services_none/scripts/custom/provision-10-example.sh is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/starter_drupal_cms_profile/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/timezone_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_be_tests_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_groups_no_fe_lint_no_theme_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_behat_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_eslint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_jest_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpcs_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpmd_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpstan_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_phpunit_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_rector_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_no_stylelint_circleci/tests/phpunit/Drupal/EnvironmentSettingsTest.php is excluded by !.vortex/installer/tests/Fixtures/**
  • .vortex/installer/tests/Fixtures/handler_process/tools_none/composer.json is excluded by !.vortex/installer/tests/Fixtures/**
📒 Files selected for processing (11)
  • .vortex/docs/content/drupal/README.mdx
  • .vortex/docs/content/drupal/settings.mdx
  • .vortex/docs/content/features.mdx
  • .vortex/installer/src/Prompts/Handlers/Modules.php
  • .vortex/installer/tests/Unit/Handlers/ModulesHandlerDiscoveryTest.php
  • .vortex/tests/bats/unit/provision.bats
  • composer.json
  • scripts/custom/provision-10-example.sh
  • tests/phpunit/Drupal/EnvironmentSettingsTest.php
  • tests/phpunit/Drupal/SwitchableSettingsTest.php
  • web/sites/default/includes/modules/settings.reroute_email.php

Comment on lines +305 to +317
**Environment behavior:**

| Environment | Rerouting enabled | Reason |
|-------------|-------------------|---------------------------------------------------------------|
| Local | No | Emails are typically not sent in local development |
| CI | No | Automated tests do not send real emails |
| Dev | **Yes** | Prevents accidental delivery to real users |
| Stage | No | Stage may require real email delivery for UAT |
| Prod | No | Production emails must reach actual recipients |

Rerouting is also enabled in any custom environments (e.g., PR environments)
that do not match the standard environment types listed above.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Clarify environment behavior for custom/PR environments.

The documentation mentions that "Rerouting is also enabled in any custom environments (e.g., PR environments)" at lines 315-316, but this behavior is not reflected in the environment behavior table above. Consider either:

  1. Adding a row to the table for "Custom/PR" environments, or
  2. Adding a footnote to the table indicating additional environments where rerouting is enabled.

This will help users understand the complete picture of when rerouting is active.

🧰 Tools
🪛 LanguageTool

[grammar] ~305-~305: Ensure spelling is correct
Context: ...ng email functionality to be tested. Environment behavior: | Environment | Rerouting ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.vortex/docs/content/drupal/settings.mdx around lines 305 - 317, Update the
environment behavior table to explicitly reflect the sentence "Rerouting is also
enabled in any custom environments (e.g., PR environments)..." by either adding
a new row labeled "Custom/PR" with "Rerouting enabled: Yes" and a short reason
("Prevents accidental delivery in ephemeral PR environments"), or add a clear
footnote below the table referencing that additional non-standard environments
enable rerouting; ensure the table and the existing sentence remain consistent
(same wording for "Rerouting enabled") so readers see the behaviour both in the
table and in the explanatory line.

"drupal/pathauto": "^1.14",
"drupal/redirect": "^1.12",
"drupal/redis": "^1.11",
"drupal/reroute_email": "^2.3@RC",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

drupal reroute_email 2.3 release version

💡 Result:

There is no stable 2.3 release of the Drupal Reroute Email module. The latest release is 2.3.0-rc2, released on October 28, 2024. The current stable version is 2.2.1. A 2.3.x development version is also available.

Citations:


Address the use of pre-release version for drupal/reroute_email.

The constraint ^2.3@RC locks to release candidate versions (currently 2.3.0-rc2). The stable version is 2.2.1. Either switch to ^2.2 for production stability, or confirm that using an RC is intentional. If waiting for the stable 2.3 release, the @RC flag will need to be removed to auto-upgrade.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@composer.json` at line 25, The composer dependency "drupal/reroute_email" is
pinned to a release-candidate with the constraint "^2.3@RC"; change it to a
stable constraint such as "^2.2" for production, or if you intentionally need
the RC, add a comment in composer.json and confirm the requirement, and when the
2.3 stable is released remove the "@RC" from "^2.3@RC" so Composer can
auto-upgrade.

Comment on lines +701 to +822
public static function dataProviderRerouteEmail(): \Iterator {
// Local: disabled by default.
yield [
self::ENVIRONMENT_LOCAL,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];

// CI: disabled by default.
yield [
self::ENVIRONMENT_CI,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];

// Dev: enabled by default.
yield [
self::ENVIRONMENT_DEV,
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];

// SUT: enabled by default.
yield [
self::ENVIRONMENT_SUT,
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];

// Stage: disabled by default.
yield [
self::ENVIRONMENT_STAGE,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];

// Prod: disabled by default.
yield [
self::ENVIRONMENT_PROD,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];

// Dev with DRUPAL_REROUTE_EMAIL_DISABLED: forced off.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 1,
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];

// SUT with DRUPAL_REROUTE_EMAIL_DISABLED: forced off.
yield [
self::ENVIRONMENT_SUT,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 1,
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];

// Custom address and allowed list.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_ADDRESS' => 'dev@example.com',
'DRUPAL_REROUTE_EMAIL_ALLOWED' => '*@example.com',
],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'dev@example.com', 'allowed' => '*@example.com'],
],
];

// DRUPAL_REROUTE_EMAIL_DISABLED with empty value: not disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => '',
],
[
'reroute_email.settings' => ['enable' => TRUE],
],
];

// DRUPAL_REROUTE_EMAIL_DISABLED with 0: not disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 0,
],
[
'reroute_email.settings' => ['enable' => TRUE],
],
];

// DRUPAL_REROUTE_EMAIL_DISABLED with string '1': disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => '1',
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a custom-environment case to lock in PR-environment behavior.

The provider covers predefined environments, but not an unknown/custom value. Add one case like pr-123 expecting enable => TRUE to prevent regressions in custom env handling.

Proposed test case addition
   public static function dataProviderRerouteEmail(): \Iterator {
+    // Custom/PR-like environment: enabled by default.
+    yield [
+      'pr-123',
+      [],
+      [
+        'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
+      ],
+    ];
+
     // Local: disabled by default.
     yield [
       self::ENVIRONMENT_LOCAL,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public static function dataProviderRerouteEmail(): \Iterator {
// Local: disabled by default.
yield [
self::ENVIRONMENT_LOCAL,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// CI: disabled by default.
yield [
self::ENVIRONMENT_CI,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Dev: enabled by default.
yield [
self::ENVIRONMENT_DEV,
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// SUT: enabled by default.
yield [
self::ENVIRONMENT_SUT,
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Stage: disabled by default.
yield [
self::ENVIRONMENT_STAGE,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Prod: disabled by default.
yield [
self::ENVIRONMENT_PROD,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Dev with DRUPAL_REROUTE_EMAIL_DISABLED: forced off.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 1,
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
// SUT with DRUPAL_REROUTE_EMAIL_DISABLED: forced off.
yield [
self::ENVIRONMENT_SUT,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 1,
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
// Custom address and allowed list.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_ADDRESS' => 'dev@example.com',
'DRUPAL_REROUTE_EMAIL_ALLOWED' => '*@example.com',
],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'dev@example.com', 'allowed' => '*@example.com'],
],
];
// DRUPAL_REROUTE_EMAIL_DISABLED with empty value: not disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => '',
],
[
'reroute_email.settings' => ['enable' => TRUE],
],
];
// DRUPAL_REROUTE_EMAIL_DISABLED with 0: not disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 0,
],
[
'reroute_email.settings' => ['enable' => TRUE],
],
];
// DRUPAL_REROUTE_EMAIL_DISABLED with string '1': disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => '1',
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
}
public static function dataProviderRerouteEmail(): \Iterator {
// Custom/PR-like environment: enabled by default.
yield [
'pr-123',
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Local: disabled by default.
yield [
self::ENVIRONMENT_LOCAL,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// CI: disabled by default.
yield [
self::ENVIRONMENT_CI,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Dev: enabled by default.
yield [
self::ENVIRONMENT_DEV,
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// SUT: enabled by default.
yield [
self::ENVIRONMENT_SUT,
[],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Stage: disabled by default.
yield [
self::ENVIRONMENT_STAGE,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Prod: disabled by default.
yield [
self::ENVIRONMENT_PROD,
[],
[
'reroute_email.settings' => ['enable' => FALSE, 'address' => 'webmaster@your-site-domain.example', 'allowed' => '*@your-site-domain.example'],
],
];
// Dev with DRUPAL_REROUTE_EMAIL_DISABLED: forced off.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 1,
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
// SUT with DRUPAL_REROUTE_EMAIL_DISABLED: forced off.
yield [
self::ENVIRONMENT_SUT,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 1,
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
// Custom address and allowed list.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_ADDRESS' => 'dev@example.com',
'DRUPAL_REROUTE_EMAIL_ALLOWED' => '*@example.com',
],
[
'reroute_email.settings' => ['enable' => TRUE, 'address' => 'dev@example.com', 'allowed' => '*@example.com'],
],
];
// DRUPAL_REROUTE_EMAIL_DISABLED with empty value: not disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => '',
],
[
'reroute_email.settings' => ['enable' => TRUE],
],
];
// DRUPAL_REROUTE_EMAIL_DISABLED with 0: not disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => 0,
],
[
'reroute_email.settings' => ['enable' => TRUE],
],
];
// DRUPAL_REROUTE_EMAIL_DISABLED with string '1': disabled.
yield [
self::ENVIRONMENT_DEV,
[
'DRUPAL_REROUTE_EMAIL_DISABLED' => '1',
],
[
'reroute_email.settings' => ['enable' => FALSE],
],
];
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/phpunit/Drupal/SwitchableSettingsTest.php` around lines 701 - 822, Add
a test case in dataProviderRerouteEmail to cover unknown/custom environments
(e.g., "pr-123") so PR-environment behavior is locked in; specifically add a
yield entry using the environment string "pr-123" (or a constant representing a
custom env) with an empty env vars array and an expected settings array
containing 'reroute_email.settings' => ['enable' => TRUE] to ensure custom envs
enable reroute_email by default. Locate dataProviderRerouteEmail in
SwitchableSettingsTest and append this yield alongside the other environment
cases.

Comment on lines +10 to +13
// Default reroute email address and allowed list.
$config['reroute_email.settings']['address'] = getenv('DRUPAL_REROUTE_EMAIL_ADDRESS') ?: 'webmaster@your-site-domain.example';
$config['reroute_email.settings']['allowed'] = getenv('DRUPAL_REROUTE_EMAIL_ALLOWED') ?: '*@your-site-domain.example';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Missing default roles override in reroute_email.settings.

The linked objective includes a default roles = '', but this config key is not set here. Omitting it can leave stale role-based behavior from existing config.

Proposed fix
 // Default reroute email address and allowed list.
 $config['reroute_email.settings']['address'] = getenv('DRUPAL_REROUTE_EMAIL_ADDRESS') ?: 'webmaster@your-site-domain.example';
 $config['reroute_email.settings']['allowed'] = getenv('DRUPAL_REROUTE_EMAIL_ALLOWED') ?: '*@your-site-domain.example';
+$config['reroute_email.settings']['roles'] = '';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Default reroute email address and allowed list.
$config['reroute_email.settings']['address'] = getenv('DRUPAL_REROUTE_EMAIL_ADDRESS') ?: 'webmaster@your-site-domain.example';
$config['reroute_email.settings']['allowed'] = getenv('DRUPAL_REROUTE_EMAIL_ALLOWED') ?: '*@your-site-domain.example';
// Default reroute email address and allowed list.
$config['reroute_email.settings']['address'] = getenv('DRUPAL_REROUTE_EMAIL_ADDRESS') ?: 'webmaster@your-site-domain.example';
$config['reroute_email.settings']['allowed'] = getenv('DRUPAL_REROUTE_EMAIL_ALLOWED') ?: '*@your-site-domain.example';
$config['reroute_email.settings']['roles'] = '';
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@web/sites/default/includes/modules/settings.reroute_email.php` around lines
10 - 13, Add a default empty roles override to the reroute_email settings so
stale role-based config isn't preserved; update the config array by setting
config['reroute_email.settings']['roles'] to the environment value or an empty
string (e.g., use getenv('DRUPAL_REROUTE_EMAIL_ROLES') ?: '') so the key exists
and defaults to '' when not provided, alongside the existing address and allowed
entries.

@github-actions
Copy link
Copy Markdown

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (196/196)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk

This comment has been minimized.

1 similar comment
@AlexSkrypnyk
Copy link
Copy Markdown
Member Author

Code coverage (threshold: 90%)

  Classes: 100.00% (1/1)
  Methods: 100.00% (2/2)
  Lines:   100.00% (196/196)
Per-class coverage
Drupal\ys_demo\Plugin\Block\CounterBlock
  Methods: 100.00% ( 2/ 2)   Lines: 100.00% ( 10/ 10)

@AlexSkrypnyk AlexSkrypnyk disabled auto-merge March 29, 2026 22:40
@AlexSkrypnyk AlexSkrypnyk merged commit 1271a17 into main Mar 29, 2026
27 of 28 checks passed
@AlexSkrypnyk AlexSkrypnyk deleted the feature/2422-reroute-email branch March 29, 2026 22:41
@github-project-automation github-project-automation bot moved this from BACKLOG to Release queue in Vortex Mar 29, 2026
@AlexSkrypnyk AlexSkrypnyk added this to the 1.38.0 milestone Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Release queue

Development

Successfully merging this pull request may close these issues.

Add email_reroute module

1 participant