Problem/Motivation

Currently, the module uses annotations (e.g., @Filter, @coversDefaultClass, @group, etc.) in its classes.
Since Drupal 10.2 and PHPUnit 10, it is recommended (and supported) to replace annotations with PHP attributes.
This modernization improves forward compatibility and aligns with Drupal core standards.

To adopt attributes, the module will need to drop support for Drupal 10, and instead only require Drupal core ^11.

Steps to reproduce

  1. Review the TableHeaderScopeAttribute and TableHeaderScopeAttributeTest classes in the module.
  2. Notice that they still rely on annotations.

Proposed resolution

  • Replace annotations in all classes with attributes.
  • Update the module's core_version_requirement to ^11.
  • Release a new major version to reflect the change in the minimum supported core version.

Remaining tasks

  • [x] Update test classes to use attributes instead of annotations.
  • [x] Adjust info.yml to require core_version_requirement: ^10.2 || ^11.

User interface changes

None. This change only affects automated tests and version requirements.

API changes

None. No public APIs are modified.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

watergate created an issue. See original summary.

watergate changed the visibility of the branch 3545923-replace-annotations-with to hidden.

watergate’s picture

Issue summary: View changes

Updated issue description, as attributes for tests are not supported by Drupal 10.

  • watergate committed a30ee242 on 2.x
    [#3545923] feat: Replace annotations with attributes
    
    By: watergate
    
watergate’s picture

Status: Active » Fixed

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.