Problem/Motivation

The module uses APIs that are deprecated in Drupal 11.2 and removed in Drupal 12:

  • The archiver and storage plugin managers only support annotation discovery (Drupal\earkiv\Annotation\Archiver and Storage). phpstan reports this in the GitLab CI pipeline.
  • hook_requirements() is replaced by hook_runtime_requirements(), which can be implemented with the Hook attribute.
  • The REQUIREMENT_* constants are replaced by the RequirementSeverity enum.

Drush 13 does not install with Drupal 12, and the module has no tests, so nothing checks that it works on the versions it claims to support.

Proposed resolution

  1. Add the attribute classes Drupal\earkiv\Attribute\Archiver and Storage, use them on the HTTrack archiver and the local storage, and pass both the attribute and the annotation class to the plugin managers, so that plugins in other modules that still use annotations keep working.
  2. Implement hook_runtime_requirements() with #[Hook('runtime_requirements')] and remove hook_requirements(). Use RequirementSeverity in the plugins.
  3. Require Drupal ^11.2 || ^12 and Drush ^13 || ^14. Drupal 11.2 is the first version with the runtime requirements hook and the severity enum, so 11.1 is no longer supported.
  4. Add a kernel test that installs the module, discovers both plugins, checks the default configuration and runs the runtime requirements.
  5. Run the pipeline against the previous minor version and the next major version (OPT_IN_TEST_PREVIOUS_MINOR, OPT_IN_TEST_NEXT_MAJOR).
  6. When all jobs pass, make phpcs, phpstan, cspell and ESLint required (allow_failure: false), so that a merge request with new findings fails.

Each step is a separate commit.

Remaining tasks

  • Implement and check the pipeline.
  • Review.

User interface changes

None.

API changes

New plugin attributes #[Archiver] and #[Storage]. Plugins with the annotations keep working. Drupal 11.1 is no longer supported.

Data model changes

None.

AI-Generated: Yes (Used Claude Code to review the deprecations and draft this issue.)

Issue fork earkiv-3637010

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

thomas alsén created an issue. See original summary.

thomas alsén’s picture

Status: Active » Fixed

Merged into 1.0.x!

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

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

Maintainers, credit people who helped resolve this issue.