Installing the module triggers deprecation notices in tests

Created on 24 July 2025, 4 days ago

Problem/Motivation

When upgrading from 4.0.21 to 4.0.25 enabling this module in CI and visiting the Drupal core status page in a functional test triggers several deprecation notices.

  4x: The Drupal\environment_indicator\ToolbarHandler is deprecated in environment_indicator:4.0.22 and is removed from environment_indicator:5.0.0. Instead, use \Drupal\environment_indicator\Service\EnvironmentIndicator or the environment_indicator_toolbar module. See https://www.drupal.org/node/3526893
    4x in DoorSignProfileTest::testProfileOnStatusPage from Drupal\Tests\door_sign_generator_service\Functional
  1x: The 'toolbar_integration' config schema is deprecated in environment_indicator:4.0.22 and and is removed from environment_indicator:5.0.0. Use submodules for integrations instead. See http://drupal.org/node/3526893.
    1x in DoorSignProfileTest::testProfileOnStatusPage from Drupal\Tests\door_sign_generator_service\Functional

Proposed resolution

The module should not be triggering it's own deprecation notices, that should only happen if our custom code is using the deprecated methods/config

Remaining tasks

Adjust the code or upgrade path to prevent self deprecation notices

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States pwolanin

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

Merge Requests

Comments & Activities

  • Issue created by @pwolanin
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

    Hi @pwolanin, thanks for filing this issue, I've created a new patch that hopefully resolves this issue.

    To create the patch (and merge request), I simply duplicated logic from within the ToolbarHandler class within the hook functions that were previously calling the deprecated service.

    Moving all of this code does feel somewhat risky so we'll definitely need to test that this doesn't cause a regression.

    If the patch for 4.0.x suffices, I can also add a new patch and merge request for the 4.1.x version.

Production build 0.71.5 2024