Replace deprecated @EntityType annotation with EntityType attribute in Environment Indicator

Created on 30 July 2025, 24 days ago

Problem/Motivation

Environment Indicator is triggering a deprecation in Drupal 11 related to the use of the @EntityType annotation for the plugin with ID environment_indicator. This annotation is deprecated and will be removed in Drupal 13. It should be replaced with the Drupal\Core\Entity\Attribute\EntityType attribute.

/builds/project/environment_indicator/web/core/lib/Drupal/Core/Plugin/Discovery/AttributeDiscoveryWithAnnotations.php:98
Using @EntityType annotation for plugin with ID environment_indicator is deprecated and is removed from drupal:13.0.0. Use a Drupal\Core\Entity\Attribute\EntityType attribute instead. See https://www.drupal.org/node/3395575
Triggered by:
* Drupal\Tests\environment_indicator\Kernel\EnvironmentIndicatorSettingsFormTest::testFormSubmission
  /builds/project/environment_indicator/tests/src/Kernel/EnvironmentIndicatorSettingsFormTest.php:47
FAILURES!
Tests: 1, Assertions: 1, Failures: 1, Deprecations: 1.

Steps to reproduce

  1. Enable the Environment Indicator module on Drupal 11.1 or later.
  2. Run the kernel test suite: phpunit --group environment_indicator.
  3. Observe the deprecation warning and test failure in EnvironmentIndicatorSettingsFormTest.

Proposed resolution

Refactor the environment_indicator plugin definition to use the EntityType attribute instead of the deprecated annotation.

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

5.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