Skip to content

Epic: DrupalDriver 3.x #312

@AlexSkrypnyk

Description

@AlexSkrypnyk

Summary

Major version bump to 3.x that drops Drupal 6 and 7 support, modernises the codebase, and introduces integration testing against real Drupal field storage using SQLite-based kernel tests.

Related PRs

Branching strategy

  1. Resolve all actionable open PRs against master (v2.x).
  2. Tag a final 2.x release.
  3. Create a 3.x branch from master - this becomes the primary development branch.
  4. The 2.x branch enters LTS for 6 months (security fixes only, no new features). Consumers on Drupal 7 pin to ^2.0.
  5. Once 3.x is stable, master tracks 3.x.

Downstream impact

DrupalExtension will likely release a new major version to require drupal-driver: ^3.0. The timeline for that is not yet confirmed.

Tasks

Pre-release: resolve open PRs on v2.x

  • Complete triage of all open PRs (40 total, 10 done)
  • Close PRs that target Drupal 6/7-only features with a note about v3.x
  • Tag final v2.x release

Drop legacy Drupal support

Rename Drupal8 classes

TBD: The naming strategy needs further discussion. Options include renaming to Drupal, DrupalCore, keeping version-less names, or another approach. The items below are provisional.

  • Rename Cores/Drupal8.php to Cores/Drupal.php (or DrupalCore.php)
  • Rename Fields/Drupal8/ directory to Fields/Drupal/
  • Update all class references and namespaces
  • Update AbstractCore::getFieldHandler() namespace resolution

Replace Docker CI with setup-php

  • Replace docker-compose.yml usage in CI with setup-php GitHub Action
  • Update CI matrix: PHP 8.2/8.3/8.4 x Drupal 10/11
  • Remove docker-compose.yml (or keep for local dev only)
  • Update CONTRIBUTING.md with new local testing instructions

Add SQLite-based kernel test infrastructure

  • Add PHPUnit kernel test base class that bootstraps Drupal with SQLite
  • Configure test site profile with required field modules (datetime, link, file, taxonomy, options)
  • Update phpunit.xml.dist with kernel test suite configuration
  • Document the kernel test setup in CONTRIBUTING.md

Add kernel tests for field handlers

  • EntityReferenceHandler - name-to-ID lookup, numeric ID passthrough, label_key=FALSE
  • TaxonomyTermReferenceHandler - term name-to-ID lookup
  • DatetimeHandler - timezone conversion, date-only vs datetime, relative dates
  • TimeHandler - strtotime conversion, numeric passthrough
  • ListStringHandler / ListIntegerHandler / ListFloatHandler - label-to-key lookup
  • ImageHandler - file entity creation from path
  • SupportedImageHandler - file entity creation with caption/attribution fields
  • LinkHandler - named keys and numeric indices (may be simplified or removed)
  • DefaultHandler - verify pass-through behaviour (may be simplified or removed)
  • AddressHandler - verify address field expansion
  • TextWithSummaryHandler - verify summary expansion
  • EmbridgeAssetItemHandler - assess if still relevant, remove if not

Assess and simplify redundant handlers

  • Evaluate DefaultHandler - does it add value beyond return $values?
  • Evaluate LinkHandler - DrupalExtension already passes named keys
  • Remove or simplify handlers that duplicate what Drupal core accepts natively
  • Document which handlers do real transformation vs pass-through

Documentation and release

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions