Problem/Motivation
As a developer, I want the acquia_dam_migration_tools submodule scaffolded with its core metadata + services files, a utility service holding the migration constants, and the shared MigrationTrait, so that the module is installable and provides the helper logic shared by the wizard and Drush commands.
Acceptance Criteria:
Scaffold:
- acquia_dam_migration_tools.info.yml — dependencies: [acquia_dam:acquia_dam], core_version_requirement: ^9.5 || ^10 || ^11, package: 'Acquia DAM', configure: acquia_dam_migration_tools.migration_config
- acquia_dam_migration_tools.services.yml — acquia_dam_migration_tools.utility registration + logger.channel.acquia_dam_migration_tools
Utility service (AcquiaDamMigrationUtilityService):
- Single source of truth for migration constants: getModuleSettingsName(), getQueueName(), getQueueMapTable(), getLockName(), getAltTextField(), getVocabFieldTypes(), getStateQueueKey() / getStateProgressKey() / getStateProcessFinishedKey() / getStateMigratedDataKey() / getStateFailedUploadsKey(), getResetStateKeys()
- processStoredValues() — re-indexes stored values by media type
Migration trait (MigrationTrait):
- Shared helpers for wizard + Drush: getCoreMediaTypes(), getMigrationConfig(), getDrupalMetadataFieldOptions(), isImageSource(), normalizeMetadataMapping(), source-plugin-ID resolution (getSourcePluginIdFromBundle), sync-method resolution (getSyncMethodFromBundle), DAM media type options (getAcquiaDamMediaTypesAsOptions)
- Lazy getters for injected services (entity type manager, config factory, logger, database, state, media source plugin manager, MediaTypeFieldOptions, utility service)
Tests:
- AcquiaDamMigrationUtilityServiceTest (unit) — constants resolution, media-type filtering, stored-value re-indexing
- MigrationTraitTest (unit) — processStoredValues; core/DAM file-extension resolution; DAM media type options; source-plugin-ID resolution; sync-method resolution
Issue fork acquia_dam-3617766
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
Comment #2
rajeshreeputraComment #5
rajeshreeputraMR merged!