Changelog¶
All notable changes to this project will be documented in this file.
Updates should follow the Keep a CHANGELOG principles.
This project adheres to Semantic Versioning. For major version 0, we will increment the minor version for backward-incompatible changes.
Unreleased¶
Changed¶
- Moved the Csv extractor and loader to soong/csv.
- Moved the DBAL integrations to soong/dbal.
- Moved the console command implementations to soong/console.
CountableExtractorBase::count()now supports caching of counts - extractors extendingCountableExtractorBaseshould overridegetUncachedCount()if they have a more efficient means of retrieving the source data count than iterating over all the source data.- A new
PropertyListinterface is added, which theExtractorandLoaderinterfaces extend instead of defining their owngetProperties()andgetKeyProperties()methods. - The processing of each record during migration is now implemented as a pipeline through all transformers and the loader, with the new
RecordPayloadclass (containing the source record and destination record) as the payload passed through each. As a result,RecordTransformer::transform($sourceData, $resultData)becomesRecordTransformer::__invoke($recordPayload), andLoader::load($resultData)becomesLoader::__invoke($recordPayload). - Property transformers are now processed as a pipeline, and implement
__invoke($data)rather thantransform($data). - The
Operationinterface, with concrete implementationsMigrateOperationandRollbackOperation, has been added. These classes, containing theTaskinstance being operated on, are now the invokable stages of the task pipeline - operations are no longer methods in theTaskobjects. TaskPipelinehas been renamed toTaskCollectionto better reflect what it is. For better compatibility with standard collection terminology, thegetTask/getAllTasks/addTaskmethods have been renamed toget/getAll/add.- Classes with the same name as the interface they are implementing have been renamed to include the word “Basic”. Specifically:
Soong\Data\Record->Soong\Data\BasicRecordSoong\Data\RecordFactory->Soong\Data\BasicRecordFactorySoong\Task\EtlTask->Soong\Task\SimpleEtlTaskSoong\Task\Task->Soong\Task\SimpleTaskSoong\Task\TaskCollection->Soong\Task\SimpleTaskCollection
- The League\Pipeline package is now used to run migration tasks. No API changes - new dependency in composer.json.
0.7.0 - 2019-06-25¶
Changed¶
- The former
Transformerinterface is now namedPropertyTransformer, to distinguish it from the newRecordTransformerinterface. - Property transformer classes have been moved to the
Soong\Transformer\Propertynamespace. - The structure of sample task configurations has been changed to use an array of
RecordTransformerinstances under thetransformkey. - Transformer construction has been moved from the
EtlTaskimplementation to theEtlCommandimplementation - thetransformoption forEtlTasknow requires an array ofRecordTransformerinstances. PropertyTransformer::transform()no longer specifies the types of its argument and return value. Implementations should specify their specific return type, and validate the expected argument type.Record::getProperty()renamed togetPropertyValue(),setProperty()renamed tosetPropertyValue().- Symfony Console dependency has been loosened to allow versions 3.4 through 4.x.
- Release checklist added to CONTRIBUTING
Removed¶
- The
PropertyandPropertyFactoryinterfaces and implementations have been removed - all code using properties now uses values directly, leaving type-checking to PHP.property_factoryconfiguration options have accordingly been removed.
Added¶
- The
RecordTransformerinterface has been added. - The
PropertyMapperrecord transformer class has been added. - The
Copyrecord transformer class has been added. - The
--limitoption has been added to themigrateandrollbackcommands. - Transformer exceptions added.
0.6.0 - 2019-05-01¶
Changed¶
EtlTasknow accepts its extract, key_map, and load components as object instances rather than constructing them from configuration.DataPropertyinterface renamed toProperty, andDataRecordinterface renamed toRecord.- Derivatives of
ExtractorBasenow must accept arecord_factoryconfiguration option, which is an instance ofRecordFactory. EtlTaskreplaced the stringrecord_classwithRecordFactoryinstancerecord_factory.
Added¶
- The
Filterinterface has been added, to determine whether a DataRecord should be processed. - The
Selectfilter has been added, allowing for filtering by comparing DataRecord properties to values using PHP comparison operators. - The
--selectoption has been added to themigratecommand, allow for ad-hoc filtering of extracted data at runtime. PropertyFactoryandRecordFactoryinterfaces/classes added for creation ofPropertyandRecordinstances.- Added basic console command tests.
property_factoryconfiguration option added toEtlTask,LoaderBase.ExtractorException,KeyMapException, andLoaderExceptionclasses added.- Unit test for
Recordadded.
0.5.3 - 2019-04-12¶
Changed¶
- Things are now configured to generate the API documentation using Doxygen on readthedocs - the generated docs are no longer kept in the repo.
0.5.2 - 2019-04-05¶
Changed¶
addTasknow takes an existing Task object instead of a class and configuration.- Static create() methods removed from all components and constructors made public.
- Static methods removed from
Taskcomponent and moved to non-static methods on the newTaskPipelinecomponent:addTask(),getTask(),getAllTasks().
Added¶
ConfigurableComponentinterface added, and all configurable component interfaces inherit from it.OptionsResolverComponentadded implementingConfigurableComponentusingSymfony\OptionsResolver- this is now the base class for all configurable components. Any such components adding configuration options to their parent class must implementoptionDefinitions()to defined them.- Commands now use
hassankhan/configinstead of custom YAML handling - configuration now can be YAML, JSON, or XML transparently (examples provided for each). TaskPipelinecomponent for managing groups of tasks.ComponentNotFoundandDuplicateTaskexceptions added.- Tests for
Extractor,KeyMap,Loader, andTaskcomponents. - Tests for
KeyMapLookupcomponent. - Smoke test to make sure all provided examples keep working.
Removed¶
isCompletedmethod onTask- unneeded until we add dependencies.
0.4.0 - 2019-02-15¶
Added¶
EtlTaskInterface::getLoader()- Tests for
DataandTransformercomponents.
Changed¶
- DBAL and Csv implementations have been moved:
Soong\Csv\Extractor->Soong\Extractor\CsvSoong\Csv\Loader->Soong\Loader\CsvSoong\DBAL\Extractor->Soong\Extractor\DBALSoong\DBAL\KeyMap->Soong\KeyMap\DBALSoong\DBAL\Loader->Soong\Extractor\Loader
InterfaceandTraitsuffixes removed from all interfaces and traits.- All interfaces moved into
Contractsdirectory. - All main components must now be created using
Class::create()rather thannew. This affects:DataPropertyInterfaceDataRecordInterfaceExtractorInterfaceKeyMapInterfaceLoaderInterfaceTaskInterfaceTransformerInterface
- Explicit component documentation pages have been removed in favor of Doxygen-generated documentation.
- Existing inline documentation has been cleaned up and expanded.
Removed¶
KeyMapFactoryMemoryKeyMap
0.3.0 - 2019-02-05¶
Added¶
- Added
getExtractor()andgetAllTasks()to task interfaces/implementations. - Initial implementation of the
statusconsole command. - All documentation moved into this repo, will be available on readthedocs.io.
DataPropertyInterface::isEmpty()DataRecordInterface::propertyExists()
Removed¶
- Removed subtask concept from task interfaces/implementations.
- Removed
CountableExtractorInterface.
Changed¶
DataRecordInterface::setProperty()no longer accepts null values (only property objects with null values).DataRecordInterface::getProperty()no longer returns null values (only property objects with null values).TransformerInterface::transform()no longer accepts or returns null values (only property objects with null values).- The
$configurationparameter toTransformerInterface::transform()has been removed - configuration should be passed in the constructor instead. - SHA256 for key hashing in
KeyMapBase. - Added configuration key for hash algorithm.
Fixed¶
- Hashing serialized keys needs to make sure values are always strings.