Loading
feat: #3637010 Make the module compatible with Drupal 12
Closes https://www.drupal.org/project/earkiv/issues/3637010
One commit per step. The module now requires Drupal ^11.2 || ^12.
Commits
- Attributes for the archiver and storage plugins. New
Drupal\earkiv\Attribute\ArchiverandStorage; the HTTrack archiver and the local storage use them. The plugin managers get both the attribute and the annotation class, so annotated plugins in other modules keep working. - Runtime requirements hook and severity enum.
#[Hook('runtime_requirements')]inHooksreplacesearkiv_requirements(); the plugins useRequirementSeverity. Both need Drupal 11.2. - Version requirements.
core_version_requirement: ^11.2 || ^12,drush/drush: ^13 || ^14(Drush 13 conflicts with Drupal 12). - Attributes for the entity types.
#[ContentEntityType]onArchiveandSchedule; the unusedfieldablekey is dropped. Found by the kernel test, which reported the annotation deprecation. - Kernel test (
EArkivTest,#[RunTestsInSeparateProcesses]): plugin discovery from the attributes, default configuration, runtime requirements withRequirementSeverity, and removal of the schedule links when a job is deleted. - CI versions:
OPT_IN_TEST_PREVIOUS_MINOR,OPT_IN_TEST_NEXT_MAJOR, and own Composer and PHPUnit jobs against Drupal 11.2.14, the lowest supported version, which the template does not test. - Required validation:
_ALL_VALIDATE_ALLOW_FAILURE: '0'.
Testing (locally on Drupal 11.4)
- Kernel test: 4 tests, 40 assertions; the only deprecation comes from Drush.
- phpstan with the gitlab_templates configuration and phpcs: no findings. No entity definition updates needed.
- Plugins discovered with their labels; the status report shows the HTTrack requirement; the archive and schedule lists, forms, settings, status report and help page work; a job runs end to end.
Drupal 11.2, 11.3 and 12 are only tested by this pipeline. The Drupal 12 jobs may fail in Composer until Drush 14 is released.
AI-Generated: Yes (Used Claude Code to make the changes, write the test and write this merge request.)