Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
As summarized in [925162-18], let's fix and complete using environment overrides from the settings.php file.
1. A hook_requirements() implementation that shows a warning when there is an environment state mismatch.
2. A warning that links to a confirmation page to run the switch.
3. An environment_enforcement submodule that simply automates this.
Comment | File | Size | Author |
---|---|---|---|
#2 | environment.988666.patch | 4.88 KB | Grayside |
Comments
Comment #1
Grayside CreditAttribution: Grayside commentedThat link again is #925162-18: Major feature extension & Drush 3.x Compatibility
Comment #2
Grayside CreditAttribution: Grayside commentedFirst stab at this. Does not add a message to every page about a mismatch, but does raise red flag with hook_requirements().
EDIT: Need to switch settings.php extension to hook_environments() to use the variable name "environment_definitions".
Comment #3
Grayside CreditAttribution: Grayside commentedWorks for me. Highly irregular, but as part of three issues with broad code impact, it is a blocker on further development. As it matches what has been discussed and agreed upon, committed.
Fixed by http://drupal.org/cvs?commit=460868
Comment #4
Grayside CreditAttribution: Grayside commentedenvironment_force module files failed to commit properly: http://drupal.org/cvs?commit=464824