Remove code deprecated in 4.0.22

Created on 18 June 2025, 20 days ago

Problem/Motivation

Several functions and compatibility checks were deprecated in environment_indicator:4.0.22, with notices that they will be removed in version 5.0.0. It's time to remove this deprecated code as part of the 5.x branch cleanup.

Deprecated Code to Remove

From environment_indicator.module:

  • _environment_indicator_switcher_links()
    Deprecated in 4.0.22. Use \Drupal\environment_indicator\Service\SwitcherManager::getLinks() instead.
    https://www.drupal.org/node/3526893 β†’
  • environment_indicator_toolbar()
    Temporary integration fallback for the environment_indicator_toolbar module. Marked with @todo for removal in 5.0.0.
  • Inline conditional checks in:
    • hook_preprocess_html()
    • hook_page_top()

    These check for the existence of the environment_indicator_toolbar module and related config settings. All are flagged with @todo for removal in 5.0.0.

Proposed Resolution

  • Remove _environment_indicator_switcher_links()
  • Remove environment_indicator_toolbar()
  • Remove all conditionals and fallback logic for environment_indicator_toolbar module
  • Ensure all usages are updated to use the current service-based replacements

Benefits

  • Reduces technical debt in the codebase
  • Prepares for a clean 5.x release
  • Avoids confusion for developers and site builders using the module API

Remaining Tasks

  • [ ] Remove deprecated functions and logic
  • [ ] Refactor usages to current APIs if needed
  • [ ] Test the switcher and toolbar output for regressions
πŸ“Œ Task
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024