├── .github ├── .htaccess ├── .metadata.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── CHANGELOG.md ├── COPYING.txt ├── LICENSE.txt ├── LICENSE_MEE.txt ├── README.md ├── composer.json ├── etc ├── class-map.xsd ├── commerce-to-commerce │ ├── 1.11.0.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.11.0.1 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.11.0.2 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.11.1.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.11.2.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.12.0.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ └── map.xml.dist │ ├── 1.12.0.1 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ └── map.xml.dist │ ├── 1.12.0.2 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ └── map.xml.dist │ ├── 1.13.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.13.0.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.13.0.2 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.13.1.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.0.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.1.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.2.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.2.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.2.2 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.2.3 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.2.4 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.0 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.1 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.10 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.2 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.3 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.4 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.6 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.7 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.8 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.3.9 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.4.0 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.4.1 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.4.2 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.4.3 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.4.4 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.14.4.5 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── class-map.xml.dist │ ├── customer-attr-document-groups.xml.dist │ ├── customer-attr-map.xml.dist │ ├── customer-attribute-groups.xml.dist │ ├── customer-document-groups.xml.dist │ ├── deltalog.xml.dist │ ├── eav-attribute-groups.xml.dist │ ├── eav-document-groups.xml.dist │ ├── log-document-groups.xml.dist │ ├── map-customer.xml.dist │ ├── map-document-groups.xml.dist │ ├── map-eav.xml.dist │ ├── map-log.xml.dist │ ├── map-sales.xml.dist │ ├── map-stores.xml.dist │ ├── map-tier-price.xml.dist │ ├── order-grids-document-groups.xml.dist │ ├── settings.xml.dist │ ├── visual_merchandiser_attribute_groups.xml.dist │ ├── visual_merchandiser_document_groups.xml.dist │ └── visual_merchandiser_map.xml.dist ├── config.xsd ├── di.xml ├── groups.xsd ├── magento_path.php ├── map.xsd ├── module.xml ├── opensource-to-commerce │ ├── 1.6.0.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── deltalog.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.6.1.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.6.2.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.7.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.7.0.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.7.0.2 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.8.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.8.1.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.0.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.1.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.1.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.2 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.3 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.4 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.0 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.1 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.10 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.2 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.3 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.4 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.6 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.7 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.8 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.9 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.0 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.1 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.2 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.3 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.4 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.5 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── class-map.xml.dist │ ├── customer-attribute-groups.xml.dist │ ├── customer-document-groups.xml.dist │ ├── deltalog.xml.dist │ ├── eav-attribute-groups.xml.dist │ ├── eav-document-groups.xml.dist │ ├── log-document-groups.xml.dist │ ├── map-customer.xml.dist │ ├── map-document-groups.xml.dist │ ├── map-eav.xml.dist │ ├── map-log.xml.dist │ ├── map-stores.xml.dist │ ├── map-tier-price.xml.dist │ ├── order-grids-document-groups.xml.dist │ └── settings.xml.dist ├── opensource-to-opensource │ ├── 1.6.0.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── deltalog.xml.dist │ │ ├── map-customer.xml.dist │ │ └── map.xml.dist │ ├── 1.6.1.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ └── map.xml.dist │ ├── 1.6.2.0 │ │ ├── config.xml.dist │ │ ├── customer-attribute-groups.xml.dist │ │ ├── map-customer.xml.dist │ │ └── map.xml.dist │ ├── 1.7.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.7.0.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.7.0.2 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.8.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.8.1.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.0.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.0.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.1.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.1.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.0 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.1 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.2 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.3 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.2.4 │ │ ├── config.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.0 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.1 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.10 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.2 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.3 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.4 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.6 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.7 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.8 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.3.9 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.0 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.1 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.2 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.3 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.4 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── 1.9.4.5 │ │ ├── config.xml.dist │ │ ├── map-tier-price.xml.dist │ │ └── map.xml.dist │ ├── class-map.xml.dist │ ├── customer-attribute-groups.xml.dist │ ├── customer-document-groups.xml.dist │ ├── deltalog.xml.dist │ ├── eav-attribute-groups.xml.dist │ ├── eav-document-groups.xml.dist │ ├── log-document-groups.xml.dist │ ├── map-customer.xml.dist │ ├── map-document-groups.xml.dist │ ├── map-eav.xml.dist │ ├── map-log.xml.dist │ ├── map-stores.xml.dist │ ├── map-tier-price.xml.dist │ ├── order-grids-document-groups.xml.dist │ └── settings.xml.dist └── settings.xsd ├── registration.php ├── src └── Migration │ ├── App │ ├── ConsoleOutputFactory.php │ ├── Mode │ │ ├── ModeInterface.php │ │ └── StepList.php │ ├── Progress.php │ ├── Progress │ │ └── File.php │ ├── ProgressBar │ │ └── LogLevelProcessor.php │ ├── ProgressBarFactory.php │ ├── SetupDeltaLog.php │ └── Step │ │ ├── AbstractDelta.php │ │ ├── AbstractIntegrity.php │ │ ├── AbstractVolume.php │ │ ├── RollbackInterface.php │ │ ├── StageFactory.php │ │ └── StageInterface.php │ ├── Config.php │ ├── Console │ ├── AbstractMigrateCommand.php │ ├── CommandList.php │ ├── MigrateDataCommand.php │ ├── MigrateDeltaCommand.php │ └── MigrateSettingsCommand.php │ ├── Exception.php │ ├── Handler │ ├── AbstractHandler.php │ ├── AddPrefix.php │ ├── BundleParentProduct.php │ ├── ClassMap.php │ ├── CleanMultiselect.php │ ├── Convert.php │ ├── ConvertDateFormat.php │ ├── ConvertEavValue.php │ ├── ConvertIp.php │ ├── ConvertTimestampToDate.php │ ├── EavAttribute │ │ ├── ApplyTo.php │ │ ├── BackendTypeForMultiselect.php │ │ └── ConvertModel.php │ ├── EavAttributeGroup │ │ └── SetGroupCode.php │ ├── Encrypt.php │ ├── FieldCopy.php │ ├── Gallery │ │ ├── InsertValueToEntity.php │ │ └── SetEntityId.php │ ├── GetDestinationValue.php │ ├── GetEventStatus.php │ ├── HandlerInterface.php │ ├── Manager.php │ ├── Placeholder.php │ ├── ProductAlertStoreId.php │ ├── QuoteMultiAddressStoreId.php │ ├── Rule │ │ ├── ConditionSql.php │ │ ├── CustomerSegmentConditionSql.php │ │ ├── NormalizationIds.php │ │ └── SerializedData.php │ ├── SalesOrderStatusState │ │ └── SetVisibleOnFront.php │ ├── Sequence.php │ ├── SerializeToJson.php │ ├── SerializeToJson │ │ ├── ConvertWithConditions.php │ │ ├── ItemOption.php │ │ └── SalesOrderItem.php │ ├── SetDefaultWebsiteId.php │ ├── SetHash.php │ ├── SetValue.php │ ├── SetValueAttributeCondition.php │ ├── Settings │ │ ├── CategoryRootId.php │ │ ├── Template.php │ │ └── UrlSuffix.php │ ├── StoreGroupCode.php │ ├── Synonym.php │ ├── Timezone.php │ ├── TruncateSuffix.php │ └── VisualMerchandiser │ │ ├── Attribute.php │ │ ├── InsertMode.php │ │ └── SmartAttribute.php │ ├── Logger │ ├── ConsoleHandler.php │ ├── FileHandler.php │ ├── Logger.php │ ├── Manager.php │ ├── MessageFormatter.php │ └── MessageProcessor.php │ ├── Mode │ ├── AbstractMode.php │ ├── Data.php │ ├── Delta.php │ └── Settings.php │ ├── Model │ ├── DocumentIdField.php │ ├── PasswordHashResolver.php │ └── PasswordVerifier.php │ ├── Plugin │ └── Customer │ │ └── Model │ │ └── AuthenticationPlugin.php │ ├── Reader │ ├── ClassMap.php │ ├── Groups.php │ ├── GroupsFactory.php │ ├── Map.php │ ├── MapFactory.php │ ├── MapInterface.php │ └── Settings.php │ ├── RecordTransformer.php │ ├── ResourceModel │ ├── AbstractCollection.php │ ├── AbstractResource.php │ ├── Adapter │ │ ├── Mysql.php │ │ └── Pdo │ │ │ └── MysqlBuilder.php │ ├── AdapterFactory.php │ ├── AdapterInterface.php │ ├── Destination.php │ ├── Document.php │ ├── Document │ │ └── Collection.php │ ├── Record.php │ ├── Record │ │ └── Collection.php │ ├── Source.php │ ├── Structure.php │ └── Structure │ │ └── Collection.php │ ├── Step │ ├── ConfigurablePrices │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── CustomCustomerAttributes │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── Customer │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Integrity.php │ │ ├── Model │ │ │ ├── AttributesDataToCustomerEntityRecords.php │ │ │ ├── AttributesDataToSkip.php │ │ │ ├── AttributesToStatic.php │ │ │ ├── EntityTypeCode.php │ │ │ └── SourceRecordsCounter.php │ │ └── Volume.php │ ├── DataIntegrity │ │ ├── Integrity.php │ │ └── Model │ │ │ ├── OrphanRecordsChecker.php │ │ │ └── OrphanRecordsCheckerFactory.php │ ├── DatabaseStage.php │ ├── Eav │ │ ├── Data.php │ │ ├── Helper.php │ │ ├── InitialData.php │ │ ├── Integrity.php │ │ ├── Integrity │ │ │ ├── AttributeFrontendInput.php │ │ │ └── ClassMap.php │ │ ├── Model │ │ │ ├── Data.php │ │ │ └── IgnoredAttributes.php │ │ └── Volume.php │ ├── Inventory │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Integrity.php │ │ ├── Model │ │ │ ├── InventoryModelInterface.php │ │ │ ├── InventoryModule.php │ │ │ ├── InventorySource.php │ │ │ ├── ShipmentSource.php │ │ │ ├── SourceItem.php │ │ │ ├── StockSalesChannel.php │ │ │ └── TableInterface.php │ │ └── Volume.php │ ├── Log │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── Map │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── OrderGrids │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── OrderGridsEE │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── PostProcessing │ │ ├── Data.php │ │ ├── Data │ │ │ ├── AttributeSetLeftoverDataCleaner.php │ │ │ ├── DeletedRecordsCounter.php │ │ │ ├── EavLeftoverDataCleaner.php │ │ │ ├── EntityTypeTextToVarcharMover.php │ │ │ ├── ProductUrlPathCleaner.php │ │ │ └── ProductsInRootCatalogCleaner.php │ │ └── Model │ │ │ ├── AttributeSetLeftoverData.php │ │ │ ├── EavLeftoverData.php │ │ │ └── ProductsInRootCatalog.php │ ├── Ratings │ │ ├── Data.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── SalesIncrement │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── SalesOrder │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── InitialData.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── Settings │ │ ├── Data.php │ │ └── Integrity.php │ ├── Stores │ │ ├── Data.php │ │ ├── Integrity.php │ │ ├── Model │ │ │ └── DocumentsList.php │ │ └── Volume.php │ ├── TierPrice │ │ ├── Data.php │ │ ├── Delta.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ ├── UrlRewrite │ │ ├── Helper.php │ │ ├── Model │ │ │ ├── Suffix.php │ │ │ ├── Version11300to2000 │ │ │ │ ├── CategoryRewrites.php │ │ │ │ ├── CmsPageRewrites.php │ │ │ │ ├── ProductRewritesIncludedIntoCategories.php │ │ │ │ ├── ProductRewritesWithoutCategories.php │ │ │ │ └── RedirectsRewrites.php │ │ │ ├── Version11410to2000 │ │ │ │ ├── CategoryRewrites.php │ │ │ │ ├── CmsPageRewrites.php │ │ │ │ ├── ProductRewritesIncludedIntoCategories.php │ │ │ │ ├── ProductRewritesWithoutCategories.php │ │ │ │ └── RedirectsRewrites.php │ │ │ ├── Version191to2000 │ │ │ │ ├── CmsPageRewrites.php │ │ │ │ └── Transformer.php │ │ │ └── VersionCommerce │ │ │ │ ├── CategoryRewritesInterface.php │ │ │ │ ├── CmsPageRewritesInterface.php │ │ │ │ ├── ProductRewritesIncludedIntoCategoriesInterface.php │ │ │ │ ├── ProductRewritesWithoutCategoriesInterface.php │ │ │ │ ├── RedirectsRewritesInterface.php │ │ │ │ ├── TableName.php │ │ │ │ └── TemporaryTable.php │ │ ├── Version11300to2000.php │ │ ├── Version11300to2000Delta.php │ │ ├── Version11410to2000.php │ │ ├── Version11410to2000Delta.php │ │ ├── Version191to2000.php │ │ └── Version191to2000Delta.php │ └── VisualMerchandiser │ │ ├── Data.php │ │ ├── Helper.php │ │ ├── Integrity.php │ │ └── Volume.php │ └── cli_commands.php └── tests ├── integration ├── etc │ └── mysql.php.dist ├── framework │ ├── Helper.php │ ├── Listener.php │ ├── ProgressBar.php │ ├── QuietLogHandler.php │ ├── autoload.php │ └── bootstrap.php ├── phpunit.ee.xml.dist ├── phpunit.xml.dist ├── resource │ ├── customer │ │ ├── dest.sql │ │ └── source.sql │ ├── data_integrity │ │ ├── dest.sql │ │ └── source.sql │ ├── default │ │ ├── dest.sql │ │ └── source.sql │ ├── eav │ │ ├── dest.sql │ │ └── source.sql │ ├── ee.eav │ │ ├── dest.sql │ │ └── source.sql │ ├── ee.url_rewrite_11410 │ │ ├── dest.sql │ │ └── source.sql │ ├── ee.url_rewrite_191 │ │ ├── dest.sql │ │ └── source.sql │ ├── post_processing │ │ ├── dest.sql │ │ └── source.sql │ ├── sales_increment │ │ ├── dest.sql │ │ └── source.sql │ ├── sales_order │ │ ├── dest.sql │ │ └── source.sql │ ├── stores │ │ ├── dest.sql │ │ └── source.sql │ ├── tier_price │ │ ├── dest.sql │ │ └── source.sql │ ├── url_rewrite_11410 │ │ ├── dest.sql │ │ └── source.sql │ └── url_rewrite_191 │ │ ├── dest.sql │ │ └── source.sql └── testsuite │ └── Migration │ ├── App │ └── SetupDeltaLogTest.php │ ├── ResourceModel │ └── SourceDestinationTest.php │ ├── Step │ ├── Customer │ │ └── DataTest.php │ ├── DataIntegrity │ │ └── IntegrityTest.php │ ├── EAV │ │ ├── DataTest.php │ │ ├── IntegrityTest.php │ │ └── VolumeTest.php │ ├── Map │ │ ├── DataTest.php │ │ ├── IntegrityTest.php │ │ └── VolumeTest.php │ ├── PostProcessing │ │ └── Model │ │ │ └── EavLeftoverDataTest.php │ ├── SalesIncrement │ │ └── DataTest.php │ ├── SalesOrder │ │ ├── DataTest.php │ │ ├── IntegrityTest.php │ │ └── VolumeTest.php │ ├── Settings │ │ └── DataTest.php │ ├── Stores │ │ ├── DataTest.php │ │ └── IntegrityTest.php │ ├── TierPrice │ │ ├── DataTest.php │ │ └── IntegrityTest.php │ └── UrlRewrite │ │ ├── Version11410to2000Test.php │ │ └── Version191to2000Test.php │ └── _files │ ├── class-map.xml │ ├── config-with-empty-map.xml │ ├── config.xml │ ├── customer-attribute-groups.xml │ ├── customer-document-groups.xml │ ├── deltalog-empty.xml │ ├── deltalog.xml │ ├── eav-attribute-groups.xml │ ├── eav-document-groups.xml │ ├── ee.config.xml │ ├── ee.eav-document-groups.xml │ ├── ee.map-eav.xml │ ├── empty-map.xml │ ├── list-log.xml.dist │ ├── map-customer.xml │ ├── map-eav.xml │ ├── map-sales.xml │ ├── map-stores.xml │ ├── map-tier-price-fail.xml │ ├── map-tier-price.xml │ ├── map.xml │ └── settings.xml ├── static ├── framework │ ├── autoload.php │ └── bootstrap.php ├── phpunit.xml.dist └── testsuite │ └── Migration │ └── Php │ ├── LiveCodeTest.php │ └── _files │ ├── annotation │ ├── blacklist │ │ └── common.txt │ └── whitelist │ │ └── common.txt │ ├── blacklist │ └── common.txt │ ├── phpcs │ ├── blacklist │ │ └── common.txt │ ├── ruleset.xml │ └── whitelist │ │ └── common.txt │ ├── phpmd │ ├── blacklist │ │ └── common.txt │ ├── ruleset.xml │ └── whitelist │ │ └── common.txt │ └── whitelist │ └── common.txt └── unit ├── framework ├── PdoTest.php ├── autoload.php └── bootstrap.php ├── phpunit.xml.dist └── testsuite └── Migration ├── App ├── Mode │ └── StepListTest.php ├── Progress │ └── FileTest.php ├── ProgressTest.php ├── SetupDeltaLogTest.php └── Step │ └── FactoryTest.php ├── ConfigTest.php ├── Handler ├── AddPrefixTest.php ├── ClassMapTest.php ├── ConvertDateFormatTest.php ├── ConvertIpTest.php ├── ConvertTest.php ├── EavAttribute │ └── ConvertModelTest.php ├── EavAttributeGroup │ └── SetGroupCodeTest.php ├── GetDestinationValueTest.php ├── GetEventStatusTest.php ├── ManagerTest.php ├── PlaceholderTest.php ├── Rule │ ├── ConditionSqlTest.php │ ├── CustomerSegmentConditionSqlTest.php │ ├── NormalizationIdsTest.php │ └── SerializedDataTest.php ├── SalesOrderStatusState │ └── SetVisibleOnFrontTest.php ├── SequenceTest.php ├── SerializeToJson │ ├── ConvertWithConditionsTest.php │ ├── ItemOptionTest.php │ └── SalesOrderItemTest.php ├── SerializeToJsonTest.php ├── SetDefaultWebsiteIdTest.php ├── SetHashTest.php ├── SetValueTest.php ├── Settings │ ├── CategoryRootIdTest.php │ ├── EncryptTest.php │ ├── TemplateTest.php │ └── UrlSuffixTest.php └── TimezonesTest.php ├── Logger ├── ConsoleHandlerTest.php ├── FileHandlerTest.php ├── LoggerTest.php └── ManagerTest.php ├── Mode ├── DataTest.php └── SettingsTest.php ├── Model └── Eav │ └── AttributeGroupNameToCodeMapTest.php ├── Reader ├── ClassMapTest.php ├── GroupsTest.php ├── MapTest.php └── SettingsTest.php ├── RecordTransformerTest.php ├── ResourceModel ├── AbstractCollectionTest.php ├── AbstractResourceTest.php ├── Adapter │ ├── MysqlTest.php │ └── Pdo │ │ └── MysqlBuilderTest.php ├── AdapterFactoryTest.php ├── DestinationTest.php ├── Document │ └── CollectionTest.php ├── DocumentTest.php ├── Record │ └── CollectionTest.php ├── RecordTest.php ├── SourceTest.php ├── Structure │ └── CollectionTest.php └── StructureTest.php ├── Step ├── CustomCustomerAttributes │ ├── DataTest.php │ ├── IntegrityTest.php │ └── VolumeTest.php ├── CustomCustomerAttributesTest.php ├── Eav │ ├── HelperTest.php │ ├── InitialDataTest.php │ ├── Integrity │ │ ├── AttributeFrontendInputTest.php │ │ └── AttributeGroupNamesTest.php │ ├── IntegrityTest.php │ ├── Model │ │ └── IgnoredAttributesTest.php │ └── VolumeTest.php ├── Log │ ├── DataTest.php │ ├── IntegrityTest.php │ └── VolumeTest.php ├── Map │ ├── DataTest.php │ ├── DeltaTest.php │ ├── HelperTest.php │ ├── IntegrityTest.php │ └── VolumeTest.php ├── PostProcessing │ ├── Data │ │ ├── EavLeftoverDataCleanerTest.php │ │ └── ProductsInRootCatalogCleanerTest.php │ └── DataTest.php ├── Ratings │ ├── DataTest.php │ ├── IntegrityTest.php │ └── VolumeTest.php ├── SalesOrder │ ├── DataTest.php │ ├── HelperTest.php │ ├── InitialDataTest.php │ ├── IntegrityTest.php │ └── VolumeTest.php ├── Settings │ ├── DataTest.php │ └── IntegrityTest.php └── UrlRewrite │ ├── Version11410to2000Test.php │ └── Version191to2000Test.php └── _files ├── class-map.xml ├── eav-attribute-groups.xml ├── eav-document-groups.xml ├── invalid-config.xml ├── map-invalid.xml ├── map.xml ├── settings-invalid.xml ├── settings.xml └── test-config.xml /.github/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Order deny,allow 3 | Deny from all 4 | 5 | = 2.4> 6 | Require all denied 7 | 8 | -------------------------------------------------------------------------------- /.github/.metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "templateVersion": "0.2", 3 | "product": { 4 | "name": "Data Migration Tool", 5 | "description": "Tool that migrate data from old Magento (1.X) into new, helping with upgrade for merchants" 6 | }, 7 | "contacts": { 8 | "team": { 9 | "name": "Support Tier4", 10 | "DL": "magento-support-experts@adobe.com", 11 | "slackChannel": "#support_experts_public" 12 | } 13 | }, 14 | "ticketTracker": { 15 | "functionalJiraQueue": { 16 | "projectKey": "ACP2E", 17 | "component": "Tools/ DataMigrationTool" 18 | }, 19 | "securityJiraQueue": { 20 | "projectKey": "MAGREQ" 21 | } 22 | }, 23 | "productionCodeBranches": ["2.4-develop"] 24 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | ### Preconditions 7 | 8 | 9 | 1. 10 | 2. 11 | 12 | ### Steps to reproduce 13 | 14 | 1. 15 | 2. 16 | 3. 17 | 18 | ### Expected result 19 | 20 | 1. 21 | 22 | ### Actual result 23 | 24 | 1. [Screenshot, logs] 25 | 26 | ### Additional notes 27 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | 4 | ### Fixed Issues (if relevant) 5 | 1. magento/data-migration-tool#: Issue title 6 | 2. ... 7 | 8 | ### Manual testing scenarios 9 | 10 | 1. ... 11 | 2. ... 12 | 13 | ### Contribution checklist 14 | - [ ] Pull request has a meaningful description of its purpose 15 | - [ ] All commits are accompanied by meaningful commit messages 16 | - [ ] All new or changed code is covered with unit/integration tests (if applicable) 17 | - [ ] README.md file is updated and included in the pull request if any [README.md predefined sections](https://github.com/magento/devdocs/wiki/Magento-module-README.md) require an update 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.buildpath 2 | /.cache 3 | /.metadata 4 | /.project 5 | /.settings 6 | atlassian* 7 | /nbproject 8 | /sitemap 9 | /.idea 10 | /.gitattributes 11 | /node_modules 12 | 13 | /tests/unit/tmp 14 | /tests/unit/phpunit.xml 15 | /tests/integration/etc/config.xml 16 | /tests/integration/etc/mysql.php 17 | /var 18 | -------------------------------------------------------------------------------- /COPYING.txt: -------------------------------------------------------------------------------- 1 | Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license 2 | 3 | http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 4 | Please see LICENSE.txt for the full text of the OSL 3.0 license or contact license@magentocommerce.com for a copy. 5 | 6 | Subject to Licensee's payment of fees and compliance with the terms and conditions of the MEE License, the MEE License supersedes the OSL 3.0 license for each source file. 7 | Please see LICENSE_MEE.txt for the full text of the MEE License or visit http://magento.com/legal/terms/enterprise. -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "magento/data-migration-tool", 3 | "description": "Migration Tool", 4 | "version": "2.4.8.1", 5 | "require": { 6 | "symfony/console": "^6.4", 7 | "magento/framework": "*", 8 | "monolog/monolog": "^3.6" 9 | }, 10 | "require-dev": { 11 | "phpunit/phpunit": "~9.5.0" 12 | }, 13 | "autoload": { 14 | "psr-4": {"Migration\\": "src/Migration"}, 15 | "files" : ["src/Migration/cli_commands.php", "registration.php"] 16 | }, 17 | "autoload-dev": { 18 | "psr-4": {"Migration\\": "tests/unit/testsuite/Migration"} 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /etc/class-map.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.0.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.0.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.0.1/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.0.1/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.0.2/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.0.2/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.1.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.1.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.2.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.11.2.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.12.0.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.12.0.1/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/1.12.0.2/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/customer-attr-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | enterprise_customer_sales_flat_order 12 | enterprise_customer_sales_flat_order_address 13 | enterprise_customer_sales_flat_quote 14 | enterprise_customer_sales_flat_quote_address 15 | 16 | 17 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/customer-attr-map.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | enterprise_customer_sales_flat_order 14 | magento_customercustomattributes_sales_flat_order 15 | 16 | 17 | enterprise_customer_sales_flat_order_address 18 | magento_customercustomattributes_sales_flat_order_address 19 | 20 | 21 | enterprise_customer_sales_flat_quote 22 | magento_customercustomattributes_sales_flat_quote 23 | 24 | 25 | enterprise_customer_sales_flat_quote_address 26 | magento_customercustomattributes_sales_flat_quote_address 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/log-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | log_visitor 12 | 13 | 14 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/map-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | search_query 12 | report_viewed_product_index 13 | 14 | 15 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/map-log.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | log_visitor 14 | customer_visitor 15 | 16 | 17 | 18 | 19 | log_visitor.last_url_id 20 | 21 | 22 | log_visitor.store_id 23 | 24 | 25 | log_visitor.first_visit_at 26 | customer_visitor.created_at 27 | 28 | 29 | 30 | 31 | 32 | 33 | log_visitor 34 | 35 | 36 | 37 | 38 | customer_visitor.customer_id 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/map-stores.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | core_store 14 | store 15 | 16 | 17 | core_store_group 18 | store_group 19 | 20 | 21 | core_website 22 | store_website 23 | 24 | 25 | 26 | 27 | core_website.is_staging 28 | 29 | 30 | core_website.master_login 31 | 32 | 33 | core_website.master_password 34 | 35 | 36 | core_website.visibility 37 | 38 | 39 | 40 | 41 | 42 | 43 | store_group.code 44 | 45 | 46 | store_group.code 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/visual_merchandiser_attribute_groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | value_id 12 | attribute_id 13 | store_id 14 | row_id 15 | value 16 | 17 | 18 | -------------------------------------------------------------------------------- /etc/commerce-to-commerce/visual_merchandiser_document_groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | merchandiser_category_values 12 | 13 | 14 | catalog_category 15 | 16 | 17 | catalog_category_entity 18 | catalog_category_entity_varchar 19 | 20 | 21 | -------------------------------------------------------------------------------- /etc/di.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /etc/magento_path.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/1.6.0.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/1.6.0.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/1.6.1.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/1.6.1.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/1.6.2.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/1.6.2.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_tier_price.entity_id 23 | catalog_product_entity_tier_price.row_id 24 | 25 | 26 | 27 | 28 | 29 | 30 | catalog_product_entity_tier_price.percentage_value 31 | 32 | 33 | catalog_product_entity_tier_price.customer_group_id 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/log-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | log_visitor 12 | 13 | 14 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/map-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | search_query 12 | report_viewed_product_index 13 | 14 | 15 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/map-log.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | log_visitor 14 | customer_visitor 15 | 16 | 17 | 18 | 19 | log_visitor.last_url_id 20 | 21 | 22 | log_visitor.store_id 23 | 24 | 25 | log_visitor.first_visit_at 26 | customer_visitor.created_at 27 | 28 | 29 | 30 | 31 | 32 | 33 | log_visitor 34 | 35 | 36 | 37 | 38 | customer_visitor.customer_id 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/map-stores.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | core_store 14 | store 15 | 16 | 17 | core_store_group 18 | store_group 19 | 20 | 21 | core_website 22 | store_website 23 | 24 | 25 | 26 | 27 | core_website.is_staging 28 | 29 | 30 | core_website.master_login 31 | 32 | 33 | core_website.master_password 34 | 35 | 36 | core_website.visibility 37 | 38 | 39 | 40 | 41 | 42 | 43 | store_group.code 44 | 45 | 46 | store_group.code 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /etc/opensource-to-commerce/order-grids-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | sales_flat_order 12 | sales_flat_order_address 13 | sales_flat_invoice 14 | sales_flat_shipment 15 | sales_flat_creditmemo 16 | sales_flat_order_payment 17 | 18 | 19 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.6.0.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.6.1.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.6.2.0/customer-attribute-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | created_in 12 | prefix 13 | firstname 14 | middlename 15 | lastname 16 | suffix 17 | dob 18 | password_hash 19 | default_billing 20 | default_shipping 21 | taxvat 22 | confirmation 23 | gender 24 | 25 | 26 | city 27 | company 28 | country_id 29 | fax 30 | firstname 31 | lastname 32 | middlename 33 | postcode 34 | prefix 35 | region 36 | region_id 37 | street 38 | suffix 39 | telephone 40 | 41 | 42 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.0/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.1/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.10/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.2/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.3/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.4/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/1.9.3.6/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/log-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | log_visitor 12 | 13 | 14 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/map-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | search_query 12 | report_viewed_product_index 13 | 14 | 15 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/map-log.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | log_visitor 14 | customer_visitor 15 | 16 | 17 | 18 | 19 | log_visitor.last_url_id 20 | 21 | 22 | log_visitor.store_id 23 | 24 | 25 | log_visitor.first_visit_at 26 | customer_visitor.created_at 27 | 28 | 29 | 30 | 31 | 32 | 33 | log_visitor 34 | 35 | 36 | 37 | 38 | customer_visitor.customer_id 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/map-stores.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | core_store 14 | store 15 | 16 | 17 | core_store_group 18 | store_group 19 | 20 | 21 | core_website 22 | store_website 23 | 24 | 25 | 26 | 27 | core_website.is_staging 28 | 29 | 30 | core_website.master_login 31 | 32 | 33 | core_website.master_password 34 | 35 | 36 | core_website.visibility 37 | 38 | 39 | 40 | 41 | 42 | 43 | store_group.code 44 | 45 | 46 | store_group.code 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/map-tier-price.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_group_price.is_percent 14 | 15 | 16 | catalog_product_entity_tier_price.customer_group_id 17 | 18 | 19 | catalog_product_entity_group_price.customer_group_id 20 | 21 | 22 | catalog_product_entity_group_price.value_id 23 | 24 | 25 | 26 | 27 | 28 | catalog_product_entity_tier_price.value_id 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | catalog_product_entity_tier_price.percentage_value 39 | 40 | 41 | catalog_product_entity_tier_price.customer_group_id 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /etc/opensource-to-opensource/order-grids-document-groups.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | sales_flat_order 12 | sales_flat_order_address 13 | sales_flat_invoice 14 | sales_flat_shipment 15 | sales_flat_creditmemo 16 | sales_flat_order_payment 17 | 18 | 19 | -------------------------------------------------------------------------------- /registration.php: -------------------------------------------------------------------------------- 1 | stepFactory = $stepFactory; 44 | $this->config = $config; 45 | $this->mode = $mode; 46 | } 47 | 48 | /** 49 | * Create instances 50 | * 51 | * @return void 52 | */ 53 | protected function createInstances() 54 | { 55 | array_walk_recursive($this->data, function (&$item, $key) { 56 | if (!is_array($item)) { 57 | $item = $this->stepFactory->create($item, ['stage' => $key, 'mode' => $this->mode]); 58 | } 59 | }); 60 | } 61 | 62 | /** 63 | * Get steps 64 | * 65 | * @return array 66 | */ 67 | public function getSteps() 68 | { 69 | if (empty($this->data)) { 70 | $this->data = $this->config->getSteps($this->mode); 71 | $this->createInstances(); 72 | } 73 | return $this->data; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/Migration/App/ProgressBarFactory.php: -------------------------------------------------------------------------------- 1 | logger = $logger; 32 | } 33 | 34 | /** 35 | * Process errors 36 | * 37 | * @param int $errorLevel 38 | * @return bool 39 | */ 40 | protected function checkForErrors($errorLevel = Logger::WARNING) 41 | { 42 | foreach ($this->errors as $error) { 43 | $this->logger->addRecord($errorLevel, $error); 44 | } 45 | return empty($this->errors); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Migration/App/Step/RollbackInterface.php: -------------------------------------------------------------------------------- 1 | objectManager = $objectManager; 33 | } 34 | 35 | /** 36 | * Create 37 | * 38 | * @param string $stageClass 39 | * @param array $arguments 40 | * @return StageInterface 41 | * @throws Exception 42 | */ 43 | public function create($stageClass, array $arguments = []) 44 | { 45 | $step = $this->objectManager->create($stageClass, $arguments); 46 | if (!($step instanceof StageInterface)) { 47 | throw new Exception("Class: $stageClass must implement StageInterface."); 48 | } 49 | 50 | return $step; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Migration/App/Step/StageInterface.php: -------------------------------------------------------------------------------- 1 | objectManager = $objectManager; 28 | } 29 | 30 | /** 31 | * Gets list of command classes 32 | * 33 | * @return string[] 34 | */ 35 | protected function getCommandsClasses() 36 | { 37 | return [ 38 | \Migration\Console\MigrateSettingsCommand::class, 39 | \Migration\Console\MigrateDataCommand::class, 40 | \Migration\Console\MigrateDeltaCommand::class 41 | ]; 42 | } 43 | 44 | /** 45 | * @inheritdoc 46 | */ 47 | public function getCommands() 48 | { 49 | $commands = []; 50 | foreach ($this->getCommandsClasses() as $class) { 51 | if (class_exists($class)) { 52 | $commands[] = $this->objectManager->get($class); 53 | } else { 54 | throw new \Exception('Class ' . $class . ' does not exist'); 55 | } 56 | } 57 | return $commands; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Migration/Console/MigrateDataCommand.php: -------------------------------------------------------------------------------- 1 | dataMode = $dataMode; 40 | parent::__construct($config, $logManager, $progress); 41 | } 42 | 43 | /** 44 | * Initialization of the command 45 | * 46 | * @return void 47 | */ 48 | protected function configure() 49 | { 50 | $this->setName($this->name) 51 | ->setDescription('Main migration of data'); 52 | parent::configure(); 53 | } 54 | 55 | /** 56 | * @inheritdoc 57 | */ 58 | protected function execute(InputInterface $input, OutputInterface $output) 59 | { 60 | $this->dataMode->run(); 61 | return Command::SUCCESS; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/Migration/Console/MigrateSettingsCommand.php: -------------------------------------------------------------------------------- 1 | settingsMode = $settingsMode; 40 | parent::__construct($config, $logManager, $progress); 41 | } 42 | 43 | /** 44 | * Initialization of the command 45 | * 46 | * @return void 47 | */ 48 | protected function configure() 49 | { 50 | $this->setName($this->name) 51 | ->setDescription('Migrate system configuration'); 52 | parent::configure(); 53 | } 54 | 55 | /** 56 | * @inheritdoc 57 | */ 58 | protected function execute(InputInterface $input, OutputInterface $output): int 59 | { 60 | $this->settingsMode->run(); 61 | return Command::SUCCESS; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/Migration/Exception.php: -------------------------------------------------------------------------------- 1 | field = $field; 30 | return $this; 31 | } 32 | 33 | /** 34 | * @inheritdoc 35 | */ 36 | public function validate(Record $record) 37 | { 38 | if (!in_array($this->field, $record->getFields())) { 39 | throw new Exception("{$this->field} field not found in the record."); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Migration/Handler/AddPrefix.php: -------------------------------------------------------------------------------- 1 | prefix = $prefix; 26 | } 27 | 28 | /** 29 | * @inheritdoc 30 | */ 31 | public function handle(Record $recordToHandle, Record $oppositeRecord) 32 | { 33 | $this->validate($recordToHandle); 34 | $recordToHandle->setValue($this->field, $this->prefix . $recordToHandle->getValue($this->field)); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Migration/Handler/ClassMap.php: -------------------------------------------------------------------------------- 1 | classMap = $classMap; 27 | } 28 | 29 | /** 30 | * @inheritdoc 31 | */ 32 | public function handle(Record $recordToHandle, Record $oppositeRecord) 33 | { 34 | $this->validate($recordToHandle); 35 | $className = $recordToHandle->getValue($this->field); 36 | $className = $this->classMap->convertClassName($className) ?: null; 37 | $recordToHandle->setValue($this->field, $className); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Migration/Handler/ConvertDateFormat.php: -------------------------------------------------------------------------------- 1 | full' => '' . \IntlDateFormatter::FULL . '', 22 | 'long' => '' . \IntlDateFormatter::LONG . '', 23 | 'medium' => '' . \IntlDateFormatter::MEDIUM . '', 24 | 'short' => '' . \IntlDateFormatter::SHORT . '' 25 | ]; 26 | $this->validate($recordToHandle); 27 | $value = $recordToHandle->getValue($this->field); 28 | $newValue = strtr($value, $replacePairs); 29 | $recordToHandle->setValue($this->field, $newValue); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Migration/Handler/ConvertIp.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 21 | 22 | $value = $recordToHandle->getValue($this->field); 23 | if (filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) 24 | || filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) 25 | ) { 26 | $newValue = (int)ip2long($value); 27 | } else if (@inet_ntop($value) !== false) { 28 | $newValue = (int)ip2long(inet_ntop($value)); 29 | } else { 30 | $newValue = 0; 31 | } 32 | 33 | $recordToHandle->setValue($this->field, $newValue); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Migration/Handler/ConvertTimestampToDate.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 21 | $value = $recordToHandle->getValue($this->field); 22 | if ($value && is_numeric($value) && $recordToHandle->getValue('frontend_input') == 'date') { 23 | $date = new \DateTime(); 24 | $date->setTimestamp($value); 25 | $newValue = $date->format('Y-m-d H:i:s'); 26 | $recordToHandle->setValue($this->field, $newValue); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Migration/Handler/EavAttribute/ConvertModel.php: -------------------------------------------------------------------------------- 1 | classMap = $classMap; 28 | } 29 | 30 | /** 31 | * @inheritdoc 32 | */ 33 | public function handle(Record $recordToHandle, Record $oppositeRecord) 34 | { 35 | $this->validate($recordToHandle); 36 | $sourceModel = $recordToHandle->getValue($this->field); 37 | $destinationModel = $oppositeRecord->getValue($this->field); 38 | $sourceModelConverted = $this->classMap->convertClassName($sourceModel); 39 | if (empty($sourceModel) && !empty($destinationModel)) { 40 | $recordToHandle->setValue($this->field, $destinationModel); 41 | } elseif (empty($sourceModel) || empty($sourceModelConverted)) { 42 | $recordToHandle->setValue($this->field, null); 43 | } else { 44 | $recordToHandle->setValue($this->field, $sourceModelConverted); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Migration/Handler/FieldCopy.php: -------------------------------------------------------------------------------- 1 | fieldCopy = $fieldCopy; 26 | } 27 | 28 | /** 29 | * @inheritdoc 30 | */ 31 | public function handle(Record $recordToHandle, Record $oppositeRecord) 32 | { 33 | $this->validate($recordToHandle); 34 | $fieldCopyValue = $recordToHandle->getValue($this->fieldCopy); 35 | if ($fieldCopyValue) { 36 | $recordToHandle->setValue($this->field, $fieldCopyValue); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Migration/Handler/GetDestinationValue.php: -------------------------------------------------------------------------------- 1 | setNullIfEmpty = $setNullIfEmpty === 'true' ? true : false; 26 | } 27 | 28 | /** 29 | * @inheritdoc 30 | */ 31 | public function handle(Record $recordToHandle, Record $oppositeRecord) 32 | { 33 | $this->validate($recordToHandle); 34 | if ($oppositeRecord->getValue($this->field) !== null || $this->setNullIfEmpty) { 35 | $recordToHandle->setValue($this->field, $oppositeRecord->getValue($this->field)); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Migration/Handler/GetEventStatus.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 28 | $dates = [ 29 | 'start' => $recordToHandle->getValue('date_start'), 30 | 'end' =>$recordToHandle->getValue('date_end') 31 | ]; 32 | $currentDate = date('Y-m-d H:i:s'); 33 | if (($dates['start'] <= $currentDate) && ($dates['end'] > $currentDate)) { 34 | $status = self::EVENT_OPEN; 35 | } elseif (($dates['start'] > $currentDate) && ($dates['end'] > $currentDate)) { 36 | $status = self::EVENT_UPCOMING; 37 | } else { 38 | $status = self::EVENT_CLOSED; 39 | } 40 | $recordToHandle->setValue($this->field, $status); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Migration/Handler/HandlerInterface.php: -------------------------------------------------------------------------------- 1 | source = $source; 28 | } 29 | 30 | /** 31 | * @inheritdoc 32 | */ 33 | public function handle(Record $recordToHandle, Record $oppositeRecord) 34 | { 35 | $this->validate($recordToHandle); 36 | $quoteItemId = $recordToHandle->getValue('quote_item_id'); 37 | $storeId = $this->getStoreId($quoteItemId); 38 | $recordToHandle->setValue($this->field, $storeId); 39 | } 40 | 41 | /** 42 | * Get store id 43 | * 44 | * @param int|string $quoteItemId 45 | * @return string 46 | */ 47 | private function getStoreId($quoteItemId) 48 | { 49 | /** @var Mysql $adapter */ 50 | $adapter = $this->source->getAdapter(); 51 | $query = $adapter->getSelect()->from( 52 | [$this->source->addDocumentPrefix('sales_flat_quote_item')], 53 | ['store_id'] 54 | )->where('item_id = ?', $quoteItemId); 55 | return $query->getAdapter()->fetchOne($query); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Migration/Handler/Rule/SerializedData.php: -------------------------------------------------------------------------------- 1 | classMap = $classMap; 28 | } 29 | 30 | /** 31 | * @inheritdoc 32 | */ 33 | public function handle(Record $recordToHandle, Record $oppositeRecord) 34 | { 35 | $this->validate($recordToHandle); 36 | $unserializedData = unserialize($recordToHandle->getValue($this->field)); 37 | if (is_array($unserializedData)) { 38 | $recordToHandle->setValue($this->field, serialize($this->replaceValues($unserializedData))); 39 | } 40 | } 41 | 42 | /** 43 | * Replace values 44 | * 45 | * @param array $data 46 | * @return array 47 | */ 48 | protected function replaceValues(array $data) 49 | { 50 | foreach ($data as &$value) { 51 | if (is_array($value)) { 52 | $value = $this->replaceValues($value); 53 | } elseif (is_string($value)) { 54 | $valueConverted = $this->classMap->convertClassName($value); 55 | $value = ($valueConverted != '') ? $valueConverted : $value; 56 | } 57 | } 58 | 59 | return $data; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Migration/Handler/SalesOrderStatusState/SetVisibleOnFront.php: -------------------------------------------------------------------------------- 1 | 0, 22 | 'pending_payment-pending_payment' => 0, 23 | 'processed_ogone-processing' => 0 24 | ]; 25 | 26 | /** 27 | * @var array 28 | */ 29 | protected $invisibleStates = ['pending_payment']; 30 | 31 | /** 32 | * @inheritdoc 33 | */ 34 | public function handle(Record $recordToHandle, Record $oppositeRecord) 35 | { 36 | $this->validate($recordToHandle); 37 | $key = $recordToHandle->getValue('status') . '-' . $recordToHandle->getValue('state'); 38 | if (isset($this->initiallyInvisible[$key]) 39 | || in_array($recordToHandle->getValue('state'), $this->invisibleStates) 40 | ) { 41 | $recordToHandle->setValue('visible_on_front', 0); 42 | } else { 43 | $recordToHandle->setValue('visible_on_front', 1); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Migration/Handler/SetDefaultWebsiteId.php: -------------------------------------------------------------------------------- 1 | source = $source; 33 | $this->defaultWebsiteId = null; 34 | } 35 | 36 | /** 37 | * @inheritdoc 38 | */ 39 | public function handle(Record $recordToHandle, Record $oppositeRecord) 40 | { 41 | if (empty($this->defaultWebsiteId)) { 42 | $this->validate($recordToHandle); 43 | foreach ($this->source->getRecords('core_website', 0) as $websiteData) { 44 | if ($websiteData['is_default'] == '1') { 45 | $this->defaultWebsiteId = $websiteData[$this->field]; 46 | break; 47 | } 48 | } 49 | } 50 | $recordToHandle->setValue($this->field, $this->defaultWebsiteId); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Migration/Handler/SetHash.php: -------------------------------------------------------------------------------- 1 | hash = $hash; 38 | $this->baseField = $baseField; 39 | } 40 | 41 | /** 42 | * @inheritdoc 43 | */ 44 | public function handle(Record $recordToHandle, Record $oppositeRecord) 45 | { 46 | $this->validate($recordToHandle); 47 | 48 | $oppositeValue = $oppositeRecord->getValue($this->baseField); 49 | $hashMethod = $this->hash; 50 | $resultValue = $hashMethod($oppositeValue); 51 | 52 | $recordToHandle->setValue($this->field, $resultValue); 53 | } 54 | 55 | /** 56 | * @inheritdoc 57 | */ 58 | public function validate(Record $record) 59 | { 60 | if (!in_array($this->hash, $this->supportedHashAlgorithms)) { 61 | throw new Exception("{$this->hash} hash algorithm is not supported."); 62 | } 63 | parent::validate($record); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Migration/Handler/SetValue.php: -------------------------------------------------------------------------------- 1 | value = (strtoupper($value) === 'NULL') ? null : $value; 26 | } 27 | 28 | /** 29 | * @inheritdoc 30 | */ 31 | public function handle(Record $recordToHandle, Record $oppositeRecord) 32 | { 33 | $this->validate($recordToHandle); 34 | $valueStored = $recordToHandle->getValue($this->field); 35 | $value = $this->value; 36 | if (is_string($value)) { 37 | $operator = substr($value, 0, 1); 38 | $value = substr($value, 1); 39 | switch ($operator) { 40 | case '+': 41 | $value = $valueStored + $value; 42 | break; 43 | case '-'; 44 | $value = $valueStored - $value; 45 | break; 46 | default: 47 | $value = $this->value; 48 | } 49 | } 50 | $recordToHandle->setValue($this->field, $value); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Migration/Handler/Settings/CategoryRootId.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 24 | $value = $recordToHandle->getValue($this->field); 25 | if ($value == self::SOURCE_DEFAULT_CATEGORY_ID) { 26 | $recordToHandle->setValue($this->field, null); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Migration/Handler/Settings/Template.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 22 | $value = $recordToHandle->getValue($this->field); 23 | $valueOpposite = $oppositeRecord->getValue($this->field); 24 | if (!is_numeric($value) && $valueOpposite) { 25 | $value = $valueOpposite; 26 | } 27 | $recordToHandle->setValue($this->field, $value); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Migration/Handler/Settings/UrlSuffix.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 22 | $value = $recordToHandle->getValue($this->field); 23 | if ($value && is_string($value) && substr($value, 0, 1) != '.') { 24 | $value = '.' . $value; 25 | } 26 | $recordToHandle->setValue($this->field, $value); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Migration/Handler/VisualMerchandiser/Attribute.php: -------------------------------------------------------------------------------- 1 | validate($recordToHandle); 24 | $value = $recordToHandle->getValue($this->field); 25 | $valueArr = explode(',', $value); 26 | if (!array_search(strtolower(self::DESTINATION_DEFAULT_SKU_ATTRIBUTE), array_map('strtolower', $valueArr))) { 27 | array_push($valueArr, self::DESTINATION_DEFAULT_SKU_ATTRIBUTE); 28 | } 29 | $recordToHandle->setValue($this->field, implode(',', $valueArr)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Migration/Handler/VisualMerchandiser/InsertMode.php: -------------------------------------------------------------------------------- 1 | '0', 23 | '2' => '1' 24 | ]; 25 | $this->validate($recordToHandle); 26 | $value = $recordToHandle->getValue($this->field); 27 | $recordToHandle->setValue($this->field, $valueMap[$value]); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Migration/Logger/Logger.php: -------------------------------------------------------------------------------- 1 | value : $level; 41 | $processed = parent::addRecord($levelValue, $message, $context); 42 | self::$messages[$levelValue][] = $message; 43 | return $processed; 44 | } 45 | 46 | /** 47 | * Returns all log messages 48 | * 49 | * @return array 50 | */ 51 | public static function getMessages() 52 | { 53 | return self::$messages; 54 | } 55 | 56 | /** 57 | * Clear all log messages 58 | * 59 | * @return void 60 | */ 61 | public static function clearMessages() 62 | { 63 | self::$messages = []; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Migration/Logger/MessageFormatter.php: -------------------------------------------------------------------------------- 1 | format = $this->getLevelFormat($record['level_name']); 26 | return parent::format($record); 27 | } 28 | 29 | /** 30 | * Get level format 31 | * 32 | * @param string $levelName 33 | * @return string 34 | */ 35 | protected function getLevelFormat($levelName) 36 | { 37 | switch ($levelName) { 38 | case 'INFO': 39 | $format = "[%datetime%][INFO]%extra.mode%%extra.stage%%extra.step%: %message%"; 40 | break; 41 | case 'DEBUG': 42 | $format = "[%datetime%][DEBUG]%extra.mode%%extra.stage%%extra.step%%extra.table%: %message%"; 43 | break; 44 | case 'ERROR': 45 | $format = "[%datetime%][ERROR]: %message%"; 46 | break; 47 | case 'WARNING': 48 | $format = "[%datetime%][WARNING]: %message%"; 49 | break; 50 | case 'NOTICE': 51 | $format = "[NOTICE]: %message%"; 52 | break; 53 | default: 54 | $format = "%message%"; 55 | } 56 | return $format; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Migration/Logger/MessageProcessor.php: -------------------------------------------------------------------------------- 1 | '', 20 | 'stage' => '', 21 | 'step' => '', 22 | 'table' => '' 23 | ]; 24 | 25 | /** 26 | * Set extra 27 | * 28 | * @param LogRecord $record 29 | * @return array 30 | */ 31 | public function setExtra(LogRecord $record) 32 | { 33 | foreach ($record['context'] as $key => $value) { 34 | switch ($key) { 35 | case 'mode': 36 | $this->extra[$key] = '[mode: ' . $value . ']'; 37 | break; 38 | case 'stage': 39 | $this->extra[$key] = '[stage: ' . $value . ']'; 40 | break; 41 | case 'step': 42 | $this->extra[$key] = '[step: ' . $value . ']'; 43 | break; 44 | case 'table': 45 | $this->extra[$key] = '[table: ' . $value . ']'; 46 | break; 47 | } 48 | } 49 | $record['extra'] = $this->extra; 50 | return $record; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/Migration/Model/DocumentIdField.php: -------------------------------------------------------------------------------- 1 | getStructure()->getFields(); 24 | foreach ($fields as $params) { 25 | if ($params['PRIMARY'] && $params['IDENTITY']) { 26 | return $params['COLUMN_NAME']; 27 | } 28 | } 29 | foreach ($fields as $params) { 30 | if ($params['PRIMARY']) { 31 | return $params['COLUMN_NAME']; 32 | } 33 | } 34 | return null; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Migration/Model/PasswordHashResolver.php: -------------------------------------------------------------------------------- 1 | customerResourceModel = $customerResourceModel; 29 | } 30 | 31 | /** 32 | * Resolve password hash 33 | * 34 | * @param Customer $customer 35 | * @return mixed 36 | */ 37 | public function resolve(Customer $customer) 38 | { 39 | $select = $this->customerResourceModel->getConnection()->select(); 40 | $select->from( 41 | ['ce' => $this->customerResourceModel->getTable('customer_entity_varchar')], 42 | 'ce.value' 43 | ); 44 | $select->where('ce.attribute_id = ?', $customer->getAttribute('password_hash')->getId()); 45 | $select->where('ce.entity_id = ?', $customer->getId()); 46 | $passwordHash = $select->getAdapter()->fetchOne($select); 47 | $passwordHash = $passwordHash ?: $customer->getPasswordHash(); 48 | return $passwordHash; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Migration/Model/PasswordVerifier.php: -------------------------------------------------------------------------------- 1 | isBcrypt($hash)) { 26 | return password_verify($password, $hash); 27 | } else if ($this->isSha512($hash)) { 28 | return hash('sha512', $salt . $password) === $hash; 29 | } 30 | return; 31 | } 32 | 33 | /** 34 | * Check if hash is Bcrypt algorithm 35 | * 36 | * @param string $hash 37 | * @return bool 38 | */ 39 | public function isBcrypt($hash) 40 | { 41 | if (stripos($hash, '$2y$') === 0) { 42 | return true; 43 | } 44 | return false; 45 | } 46 | 47 | /** 48 | * Check if hash is sha-512 algorithm 49 | * 50 | * @param string $hash 51 | * @return bool 52 | */ 53 | public function isSha512($hash) 54 | { 55 | $hash = explode(':', $hash)[0]; 56 | if (strlen($hash) === 128) { 57 | return true; 58 | } 59 | return false; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/Migration/Reader/GroupsFactory.php: -------------------------------------------------------------------------------- 1 | objectManager = $objectManager; 47 | $this->config = $config; 48 | $this->instanceName = $instanceName; 49 | } 50 | 51 | /** 52 | * Create groups from file specified in config option 53 | * 54 | * @param string $configOption 55 | * @return \Migration\Reader\Groups 56 | */ 57 | public function create($configOption) 58 | { 59 | $groupsFile = $this->config->getOption($configOption); 60 | return $this->objectManager->create($this->instanceName, ['groupsFile' => $groupsFile]); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/Migration/Reader/MapFactory.php: -------------------------------------------------------------------------------- 1 | objectManager = $objectManager; 45 | $this->config = $config; 46 | $this->instanceName = $instanceName; 47 | } 48 | 49 | /** 50 | * Create map from file specified in config option 51 | * 52 | * @param string $configOption 53 | * @return \Migration\Reader\Map 54 | */ 55 | public function create($configOption) 56 | { 57 | $mapFile = $this->config->getOption($configOption); 58 | return $this->objectManager->create($this->instanceName, ['mapFile' => $mapFile]); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/Migration/ResourceModel/AbstractCollection.php: -------------------------------------------------------------------------------- 1 | data = $data; 29 | $this->rewind(); 30 | } 31 | 32 | /** 33 | * @inheritdoc 34 | */ 35 | public function current(): mixed 36 | { 37 | return $this->data[$this->position]; 38 | } 39 | 40 | /** 41 | * @inheritdoc 42 | */ 43 | public function key(): mixed 44 | { 45 | return $this->position; 46 | } 47 | 48 | /** 49 | * @inheritdoc 50 | */ 51 | public function next(): void 52 | { 53 | $this->position++; 54 | } 55 | 56 | /** 57 | * @inheritdoc 58 | */ 59 | public function rewind(): void 60 | { 61 | $this->position = 0; 62 | } 63 | 64 | /** 65 | * @inheritdoc 66 | */ 67 | public function valid(): bool 68 | { 69 | return $this->key() < count($this->data); 70 | } 71 | 72 | /** 73 | * @inheritdoc 74 | */ 75 | public function count(): int 76 | { 77 | return count($this->data); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /src/Migration/ResourceModel/AdapterFactory.php: -------------------------------------------------------------------------------- 1 | objectManager = $objectManager; 43 | $this->configReader = $configReader; 44 | } 45 | 46 | /** 47 | * Create class instance with specified parameters 48 | * 49 | * @param array $data 50 | * @return AdapterInterface 51 | */ 52 | public function create(array $data = []) 53 | { 54 | $classNameInConfig = $this->configReader->getOption('resource_adapter_class_name'); 55 | $className = !empty($classNameInConfig) ? $classNameInConfig : $this->defaultClassName; 56 | return $this->objectManager->create($className, $data); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Migration/ResourceModel/Document/Collection.php: -------------------------------------------------------------------------------- 1 | data as $document) { 27 | if ($document->getName() == $documentName) { 28 | return $document; 29 | } 30 | } 31 | return null; 32 | } 33 | 34 | /** 35 | * Add Document to collection 36 | * 37 | * @param \Migration\ResourceModel\Document $document 38 | * @return $this 39 | */ 40 | public function addDocument($document) 41 | { 42 | $this->data[] = $document; 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Migration/ResourceModel/Structure.php: -------------------------------------------------------------------------------- 1 | data = $data; 24 | } 25 | 26 | /** 27 | * Check field exists in Structure 28 | * 29 | * @param string $name 30 | * @return bool 31 | */ 32 | public function hasField($name) 33 | { 34 | return isset($this->data[$name]); 35 | } 36 | 37 | /** 38 | * Get Structure field 39 | * 40 | * @return array 41 | */ 42 | public function getFields() 43 | { 44 | return $this->data; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Migration/ResourceModel/Structure/Collection.php: -------------------------------------------------------------------------------- 1 | structureDocuments = array_flip(array_keys($data)); 24 | $this->data = array_values($data); 25 | $this->rewind(); 26 | } 27 | 28 | /** 29 | * Get Structure from collection 30 | * 31 | * @param string $documentName 32 | * @return \Migration\ResourceModel\Structure|null 33 | */ 34 | public function getStructure($documentName) 35 | { 36 | if (isset($this->structureDocuments[$documentName])) { 37 | return $this->data[$this->structureDocuments[$documentName]]; 38 | } 39 | return null; 40 | } 41 | 42 | /** 43 | * Add Structure to collection 44 | * 45 | * @param string $documentName 46 | * @param \Migration\ResourceModel\Structure $structure 47 | * @return $this 48 | */ 49 | public function addStructure($documentName, $structure) 50 | { 51 | $position = count($this->data); 52 | $this->data[] = $structure; 53 | $this->structureDocuments[$documentName] = $position; 54 | return $this; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/Migration/Step/DatabaseStage.php: -------------------------------------------------------------------------------- 1 | configReader = $config; 31 | if (!$this->canStart()) { 32 | throw new Exception('Can not execute step'); 33 | } 34 | } 35 | 36 | /** 37 | * Check Step can be started 38 | * 39 | * @return bool 40 | */ 41 | protected function canStart() 42 | { 43 | return $this->configReader->getSource()['type'] == self::SOURCE_TYPE; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Migration/Step/Inventory/Model/InventoryModelInterface.php: -------------------------------------------------------------------------------- 1 | moduleList = $moduleList; 27 | } 28 | 29 | /** 30 | * Check if Inventory module is enabled 31 | * 32 | * @return bool 33 | */ 34 | public function isInventoryModuleEnabled() 35 | { 36 | return in_array('Magento_Inventory', $this->moduleList->getNames()); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Migration/Step/Inventory/Model/InventorySource.php: -------------------------------------------------------------------------------- 1 | destination = $destination; 44 | } 45 | 46 | /** 47 | * Get default source code 48 | * 49 | * @return string 50 | */ 51 | public function getDefaultSourceCode() 52 | { 53 | if ($this->defaultSourceCode) { 54 | return $this->defaultSourceCode; 55 | } 56 | /** @var \Magento\Framework\DB\Select $select */ 57 | $select = $this->destination->getAdapter()->getSelect() 58 | ->from($this->destination->addDocumentPrefix($this->sourceTable), [$this->defaultField]); 59 | $this->defaultSourceCode = $select->getAdapter()->fetchOne($select); 60 | 61 | return $this->defaultSourceCode; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/Migration/Step/Inventory/Model/TableInterface.php: -------------------------------------------------------------------------------- 1 | getDocumentsMap(); 21 | return array_keys($map); 22 | } 23 | 24 | /** 25 | * Get destination documents 26 | * 27 | * @return array 28 | */ 29 | public function getDestinationDocuments() 30 | { 31 | $map = $this->getDocumentsMap(); 32 | return array_values($map); 33 | } 34 | 35 | /** 36 | * Get documents map 37 | * 38 | * @return array 39 | */ 40 | public function getDocumentsMap() 41 | { 42 | return [ 43 | 'core_store' => 'store', 44 | 'core_store_group' => 'store_group', 45 | 'core_website' => 'store_website' 46 | ]; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Migration/Step/UrlRewrite/Model/VersionCommerce/CategoryRewritesInterface.php: -------------------------------------------------------------------------------- 1 | temporaryTableName = 'url_rewrite_m2' . md5('url_rewrite_m2'); 34 | } 35 | 36 | /** 37 | * Return name of temporary table 38 | * 39 | * @return string 40 | */ 41 | public function getTemporaryTableName() 42 | { 43 | return $this->temporaryTableName; 44 | } 45 | 46 | /** 47 | * Return name of url rewrite table 48 | * 49 | * @return string 50 | */ 51 | public function getDestinationTableName() 52 | { 53 | return $this->destinationTableName; 54 | } 55 | 56 | /** 57 | * Return name of url rewrite product category table 58 | * 59 | * @return string 60 | */ 61 | public function getDestinationProductCategoryTableName() 62 | { 63 | return $this->destinationProductCategoryTableName; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Migration/cli_commands.php: -------------------------------------------------------------------------------- 1 | 'magento1_integration', 9 | 'source_db_host' => 'localhost', 10 | 'source_db_user' => 'root', 11 | 'source_db_pass' => '', 12 | 'dest_db_name' => 'magento2_integration', 13 | 'dest_db_host' => 'localhost', 14 | 'dest_db_user' => 'root', 15 | 'dest_db_pass' => '', 16 | ]; 17 | -------------------------------------------------------------------------------- /tests/integration/framework/ProgressBar.php: -------------------------------------------------------------------------------- 1 | add('Migration\\Test\\', "{$testsBaseDir}/testsuite/Migration"); 14 | $vendorAutoload->addPsr4('Migration\\TestFramework\\', "{$testsBaseDir}/framework"); 15 | -------------------------------------------------------------------------------- /tests/integration/framework/bootstrap.php: -------------------------------------------------------------------------------- 1 | deleteDirectory(TESTS_TEMP_DIR); 17 | } 18 | mkdir(TESTS_TEMP_DIR); 19 | 20 | \Magento\Framework\Phrase::setRenderer(new \Magento\Framework\Phrase\Renderer\Placeholder()); 21 | 22 | set_time_limit(0); 23 | ini_set('display_errors', 1); 24 | error_reporting(E_ALL); 25 | date_default_timezone_set('UTC'); 26 | -------------------------------------------------------------------------------- /tests/integration/phpunit.ee.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 14 | testsuite 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/integration/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 14 | testsuite 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/integration/resource/data_integrity/dest.sql: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright © Magento, Inc. All rights reserved. 3 | * See COPYING.txt for license details. 4 | */ 5 | -------------------------------------------------------------------------------- /tests/integration/resource/post_processing/source.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magento/data-migration-tool/06126f33b1972f138aef2464f9e15f193a3df730/tests/integration/resource/post_processing/source.sql -------------------------------------------------------------------------------- /tests/integration/resource/tier_price/dest.sql: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright © Magento, Inc. All rights reserved. 3 | * See COPYING.txt for license details. 4 | */ 5 | 6 | CREATE TABLE `catalog_product_entity_tier_price` ( 7 | `value_id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID', 8 | `entity_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Entity ID', 9 | `all_groups` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Is Applicable To All Customer Groups', 10 | `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Customer Group ID', 11 | `qty` DECIMAL(12,4) NOT NULL DEFAULT '1.0000' COMMENT 'QTY', 12 | `value` DECIMAL(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Value', 13 | `website_id` SMALLINT(5) UNSIGNED NOT NULL COMMENT 'Website ID', 14 | PRIMARY KEY (`value_id`), 15 | UNIQUE INDEX `UNQ_E8AB433B9ACB00343ABB312AD2FAB087` (`entity_id`, `all_groups`, `customer_group_id`, `qty`, `website_id`), 16 | INDEX `CATALOG_PRODUCT_ENTITY_TIER_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`), 17 | INDEX `CATALOG_PRODUCT_ENTITY_TIER_PRICE_WEBSITE_ID` (`website_id`) 18 | ) 19 | COMMENT='Catalog Product Tier Price Attribute Backend Table' 20 | COLLATE='utf8_general_ci' 21 | ENGINE=InnoDB 22 | AUTO_INCREMENT=0 23 | ; 24 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/Step/EAV/DataTest.php: -------------------------------------------------------------------------------- 1 | getObjectManager(); 25 | $objectManager->get(\Migration\Config::class)->init(dirname(__DIR__) . '/../_files/config.xml'); 26 | $initialData = $objectManager->get(\Migration\Step\Eav\InitialData::class); 27 | $this->eav = $objectManager->create( 28 | \Migration\Step\Eav\Data::class, 29 | [ 30 | 'initialData' => $initialData, 31 | ] 32 | ); 33 | } 34 | 35 | /** 36 | * @return void 37 | */ 38 | public function testPerform() 39 | { 40 | $this->assertTrue($this->eav->perform()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/Step/EAV/IntegrityTest.php: -------------------------------------------------------------------------------- 1 | getObjectManager(); 25 | $objectManager->get(\Migration\Config::class)->init(dirname(__DIR__) . '/../_files/config.xml'); 26 | $initialData = $objectManager->get(\Migration\Step\Eav\InitialData::class); 27 | $this->eav = $objectManager->create( 28 | \Migration\Step\Eav\Integrity::class, 29 | [ 30 | 'initialData' => $initialData, 31 | ] 32 | ); 33 | } 34 | 35 | /** 36 | * @return void 37 | */ 38 | public function testPerform() 39 | { 40 | $this->assertTrue($this->eav->perform()); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/Step/EAV/VolumeTest.php: -------------------------------------------------------------------------------- 1 | getObjectManager(); 30 | $objectManager->get(\Migration\Config::class)->init(dirname(__DIR__) . '/../_files/config.xml'); 31 | $initialData = $objectManager->get(\Migration\Step\Eav\InitialData::class); 32 | $ignoredAttributes = $objectManager->get(\Migration\Step\Eav\Model\IgnoredAttributes::class); 33 | $this->data = $objectManager->create( 34 | \Migration\Step\Eav\Data::class, 35 | [ 36 | 'initialData' => $initialData, 37 | ] 38 | ); 39 | $this->volume = $objectManager->create( 40 | \Migration\Step\Eav\Volume::class, 41 | [ 42 | 'initialData' => $initialData, 43 | 'ignoredAttributes' => $ignoredAttributes 44 | ] 45 | ); 46 | } 47 | 48 | /** 49 | * @return void 50 | */ 51 | public function testPerform() 52 | { 53 | $this->assertTrue($this->data->perform()); 54 | $this->assertTrue($this->volume->perform()); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/config-with-empty-map.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | tests/integration/testsuite/Migration/_files/empty-map.xml 19 | tests/integration/testsuite/Migration/_files/eav-map.xml 20 | tests/integration/testsuite/Migration/_files/map-log.xml 21 | tests/integration/testsuite/Migration/_files/settings.xml 22 | test/integration/testsuite/Migration/_files/map/sales.xml 23 | tests/integration/testsuite/Migration/_files/customer-document-groups.xml 24 | tests/integration/testsuite/Migration/_files/customer-attribute-groups.xml 25 | tests/integration/testsuite/Migration/_files/map-stores.xml 26 | 100 27 | opensource-to-opensource 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/deltalog-empty.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/deltalog.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | table_with_data 12 | 13 | 14 | source_table_1 15 | source_table_2 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/eav-attribute-groups.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | msrp_enabled 12 | group_price 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/empty-map.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/list-log.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | entity_type_id 12 | 13 | 14 | log_customer 15 | log_quote 16 | log_summary 17 | log_summary_type 18 | log_url 19 | log_url_info 20 | log_visitor 21 | log_visitor_info 22 | log_visitor_online 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/map-sales.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | sales_flat_order 14 | sales_order 15 | 16 | 17 | 18 | 19 | sales_flat_order.reward_points_balance_refunded 20 | 21 | 22 | sales_flat_order.reward_salesrule_points 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/map-stores.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | core_store 14 | store 15 | 16 | 17 | core_store_group 18 | store_group 19 | 20 | 21 | core_website 22 | store_website 23 | 24 | 25 | 26 | 27 | core_website.is_staging 28 | 29 | 30 | core_website.master_login 31 | 32 | 33 | core_website.master_password 34 | 35 | 36 | core_website.visibility 37 | 38 | 39 | 40 | 41 | 42 | 43 | store_group.code 44 | 45 | 46 | store_group.code 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/map-tier-price-fail.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/map-tier-price.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | catalog_product_entity_tier_price.custom_field 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/integration/testsuite/Migration/_files/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | web/unsecure/base_url 13 | 14 | 15 | admin/security/session_cookie_lifetime 16 | admin/security/session_lifetime 17 | 18 | 19 | 20 | 21 | catalog/seo/product_url_suffix 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/static/framework/autoload.php: -------------------------------------------------------------------------------- 1 | addPsr4('Magento\\', $testsBaseDir . '/testsuite/Magento/'); 16 | $autoloadWrapper->addPsr4('Magento\\', $testsBaseDirMigration . '/testsuite/Migration/'); 17 | $autoloadWrapper->addPsr4( 18 | 'Magento\\TestFramework\\', 19 | [ 20 | $testsBaseDir . '/framework/Magento/TestFramework/', 21 | $testsBaseDir . '/../integration/framework/Magento/TestFramework/', 22 | ] 23 | ); 24 | $autoloadWrapper->addPsr4('Magento\\CodeMessDetector\\', $testsBaseDir . '/framework/Magento/CodeMessDetector'); 25 | 26 | $generatedCode = DirectoryList::getDefaultConfig()[DirectoryList::GENERATED_CODE][DirectoryList::PATH]; 27 | $autoloadWrapper->addPsr4('Magento\\', $baseDir . '/' . $generatedCode . '/Magento/'); 28 | -------------------------------------------------------------------------------- /tests/static/framework/bootstrap.php: -------------------------------------------------------------------------------- 1 | deleteDirectory(TESTS_TEMP_DIR); 24 | } 25 | mkdir(TESTS_TEMP_DIR); 26 | 27 | $componentRegistrar = new ComponentRegistrar(); 28 | $dirSearch = new DirSearch($componentRegistrar, new ReadFactory(new DriverPool())); 29 | $themePackageList = new ThemePackageList($componentRegistrar, new ThemePackageFactory()); 30 | $serializer = new \Magento\Framework\Serialize\Serializer\Json(); 31 | $regexIteratorFactory = new Magento\Framework\App\Utility\RegexIteratorFactory(); 32 | \Magento\Framework\App\Utility\Files::setInstance( 33 | new Files($componentRegistrar, $dirSearch, $themePackageList, $serializer, $regexIteratorFactory) 34 | ); 35 | 36 | error_reporting(E_ALL); 37 | ini_set('display_errors', 1); 38 | -------------------------------------------------------------------------------- /tests/static/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 10 | 15 | 16 | 17 | testsuite/Migration/Php/LiveCodeTest.php 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/annotation/blacklist/common.txt: -------------------------------------------------------------------------------- 1 | # Files or directories that are included into static code analysis 2 | # Glob patterns are supported 3 | # 4 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/annotation/whitelist/common.txt: -------------------------------------------------------------------------------- 1 | # Files or directories that are included into static code analysis 2 | # Glob patterns are supported 3 | # 4 | vendor/magento/data-migration-tool/src 5 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/blacklist/common.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magento/data-migration-tool/06126f33b1972f138aef2464f9e15f193a3df730/tests/static/testsuite/Migration/Php/_files/blacklist/common.txt -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/phpcs/blacklist/common.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/magento/data-migration-tool/06126f33b1972f138aef2464f9e15f193a3df730/tests/static/testsuite/Migration/Php/_files/phpcs/blacklist/common.txt -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/phpcs/whitelist/common.txt: -------------------------------------------------------------------------------- 1 | # Files or directories that are included into static code analysis 2 | # Glob patterns are supported 3 | # 4 | vendor/magento/data-migration-tool/src 5 | vendor/magento/data-migration-tool/tests 6 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/phpmd/blacklist/common.txt: -------------------------------------------------------------------------------- 1 | # Files or directories that are included into static code analysis 2 | # Glob patterns are supported 3 | # 4 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/phpmd/ruleset.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 12 | Magento Code Check Rules 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/phpmd/whitelist/common.txt: -------------------------------------------------------------------------------- 1 | # Files or directories that are included into static code analysis 2 | # Glob patterns are supported 3 | # 4 | vendor/magento/data-migration-tool/src 5 | -------------------------------------------------------------------------------- /tests/static/testsuite/Migration/Php/_files/whitelist/common.txt: -------------------------------------------------------------------------------- 1 | # Files or directories that are included into static code analysis 2 | # Glob patterns are supported 3 | # 4 | vendor/magento/data-migration-tool/src 5 | -------------------------------------------------------------------------------- /tests/unit/framework/PdoTest.php: -------------------------------------------------------------------------------- 1 | add('Migration\\Test\\', "{$testsBaseDir}/testsuite/Migration"); 14 | $vendorAutoload->addPsr4('Migration\\TestFramework\\', "{$testsBaseDir}/framework"); 15 | -------------------------------------------------------------------------------- /tests/unit/framework/bootstrap.php: -------------------------------------------------------------------------------- 1 | deleteDirectory(TESTS_TEMP_DIR); 17 | } 18 | mkdir(TESTS_TEMP_DIR); 19 | 20 | \Magento\Framework\Phrase::setRenderer(new \Magento\Framework\Phrase\Renderer\Placeholder()); 21 | 22 | set_time_limit(0); 23 | error_reporting(E_ALL); 24 | ini_set('display_errors', 1); 25 | date_default_timezone_set('UTC'); 26 | -------------------------------------------------------------------------------- /tests/unit/phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 14 | testsuite 15 | 16 | 26 | 27 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/App/Mode/StepListTest.php: -------------------------------------------------------------------------------- 1 | createMock(\Migration\App\Step\StageInterface::class); 19 | $stage2 = $this->createMock(\Migration\App\Step\StageInterface::class); 20 | $stepFactory = $this->createMock(\Migration\App\Step\StageFactory::class); 21 | $stepFactory->expects($this->any())->method('create')->willReturnMap([ 22 | ['\Migration\Step\Stage1', ['stage' => 'stage1'], $stage1], 23 | ['\Migration\Step\Stage2', ['stage' => 'stage2'], $stage2] 24 | ]); 25 | $config = $this->createMock(\Migration\Config::class); 26 | $config->expects($this->any())->method('getSteps')->with('mode')->willReturn([ 27 | 'Test Step' => [ 28 | 'stage1' => '\Migration\Step\Stage1', 29 | 'stage2' => '\Migration\Step\Stage2', 30 | ] 31 | ]); 32 | $stepList = new StepList($stepFactory, $config, 'mode'); 33 | $this->assertEquals(['Test Step' => ['stage1' => $stage1, 'stage2' => $stage2]], $stepList->getSteps()); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/App/Step/FactoryTest.php: -------------------------------------------------------------------------------- 1 | objectManager = $this->getMockBuilder(\Magento\Framework\ObjectManager\ObjectManager::class) 29 | ->disableOriginalConstructor() 30 | ->getMock(); 31 | $this->factory = new StageFactory($this->objectManager); 32 | } 33 | 34 | /** 35 | * @throws \Migration\Exception 36 | * @return void 37 | */ 38 | public function testCreate() 39 | { 40 | $step = $this->createMock(\Migration\App\Step\StageInterface::class); 41 | $this->objectManager->expects($this->once())->method('create')->will($this->returnValue($step)); 42 | $this->assertSame($step, $this->factory->create(\Migration\Steps\Integrity::class)); 43 | } 44 | 45 | /** 46 | * @throws \Migration\Exception 47 | * @return void 48 | */ 49 | public function testCreateStepWithException() 50 | { 51 | $this->expectException('\Exception'); 52 | $this->expectExceptionMessage('Class: Migration\Step\Integrity must implement StageInterface.'); 53 | $this->factory->create(\Migration\Step\Integrity::class); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/AddPrefixTest.php: -------------------------------------------------------------------------------- 1 | getMockBuilder(\Migration\ResourceModel\Record::class) 23 | ->setMethods(['getValue', 'setValue', 'getFields']) 24 | ->disableOriginalConstructor() 25 | ->getMock(); 26 | $recordToHandle->expects($this->once())->method('getFields')->will($this->returnValue([$fieldName])); 27 | $recordToHandle->expects($this->once())->method('getValue')->with($fieldName)->will($this->returnValue('val')); 28 | $recordToHandle->expects($this->once())->method('setValue')->with($fieldName, $prefix . 'val'); 29 | 30 | $oppositeRecord = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 31 | ->disableOriginalConstructor() 32 | ->getMock(); 33 | 34 | $handler = new AddPrefix($prefix); 35 | $handler->setField($fieldName); 36 | $handler->handle($recordToHandle, $oppositeRecord); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/ClassMapTest.php: -------------------------------------------------------------------------------- 1 | createPartialMock( 20 | \Migration\ResourceModel\Record::class, 21 | ['getValue', 'setValue', 'getFields'] 22 | ); 23 | $record->expects($this->once())->method('getValue')->with($fieldName)->willReturn($classOldFashion); 24 | $record->expects($this->once())->method('setValue')->with($fieldName, $classNewStyle); 25 | $record->expects($this->once())->method('getFields')->will($this->returnValue([$fieldName])); 26 | $record2 = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 27 | ->disableOriginalConstructor() 28 | ->getMock(); 29 | $classMap = $this->createPartialMock( 30 | \Migration\Reader\ClassMap::class, 31 | ['convertClassName'] 32 | ); 33 | $classMap->expects($this->once()) 34 | ->method('convertClassName') 35 | ->with($classOldFashion) 36 | ->willReturn($classNewStyle); 37 | $handler = new \Migration\Handler\ClassMap($classMap); 38 | $handler->setField($fieldName); 39 | $handler->handle($record, $record2); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/ConvertDateFormatTest.php: -------------------------------------------------------------------------------- 1 | fulllongmedium' 17 | . 'short'; 18 | $convertedValue = '012' 19 | . '3'; 20 | $fieldName = 'fieldname'; 21 | 22 | /** @var \Migration\ResourceModel\Record|\PHPUnit_Framework_MockObject_MockObject $record */ 23 | $record = $this->createPartialMock( 24 | \Migration\ResourceModel\Record::class, 25 | ['setValue', 'getValue', 'getFields'] 26 | ); 27 | $record->expects($this->any())->method('getFields')->willReturn([$fieldName]); 28 | $record->expects($this->any())->method('getValue')->with($fieldName)->willReturn($fieldValue); 29 | $record->expects($this->any())->method('setValue')->with($fieldName, $convertedValue); 30 | 31 | /** @var \Migration\ResourceModel\Record|\PHPUnit_Framework_MockObject_MockObject $record2 */ 32 | $record2 = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 33 | ->disableOriginalConstructor() 34 | ->getMock(); 35 | 36 | $handler = new ConvertDateFormat(); 37 | $handler->setField($fieldName); 38 | $this->assertNull($handler->handle($record, $record2)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/ConvertIpTest.php: -------------------------------------------------------------------------------- 1 | createPartialMock( 23 | \Migration\ResourceModel\Record::class, 24 | ['setValue', 'getValue', 'getFields'] 25 | ); 26 | $record->expects($this->any())->method('getFields')->willReturn([$fieldName]); 27 | $record->expects($this->any())->method('getValue')->with($fieldName)->willReturn($ipDbValue); 28 | $record->expects($this->any())->method('setValue')->with($fieldName, ip2long(inet_ntop($ipDbValue))); 29 | 30 | /** @var \Migration\ResourceModel\Record|\PHPUnit_Framework_MockObject_MockObject $record2 */ 31 | $record2 = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 32 | ->disableOriginalConstructor() 33 | ->getMock(); 34 | 35 | $handler = new ConvertIp(); 36 | $handler->setField($fieldName); 37 | $this->assertNull($handler->handle($record, $record2)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/SetHashTest.php: -------------------------------------------------------------------------------- 1 | createPartialMock( 22 | \Migration\ResourceModel\Record::class, 23 | ['setValue', 'getFields'] 24 | ); 25 | $recordToHandle->expects($this->once())->method('setValue')->with($fieldName, $hash($baseFieldValue)); 26 | $recordToHandle->expects($this->once())->method('getFields')->will($this->returnValue([$fieldName])); 27 | 28 | $oppositeRecord = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 29 | ->setMethods(['getValue']) 30 | ->disableOriginalConstructor() 31 | ->getMock(); 32 | 33 | $oppositeRecord->expects($this->any()) 34 | ->method('getValue') 35 | ->with($baseField) 36 | ->will($this->returnValue($baseFieldValue)); 37 | 38 | $handler = new SetHash($hash, $baseField); 39 | $handler->setField($fieldName); 40 | $handler->handle($recordToHandle, $oppositeRecord); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/Settings/CategoryRootIdTest.php: -------------------------------------------------------------------------------- 1 | createPartialMock( 20 | \Migration\ResourceModel\Record::class, 21 | ['getValue', 'setValue', 'getFields'] 22 | ); 23 | $recordToHandle->expects($this->once())->method('getValue')->with($fieldName)->willReturn($categoryRootId); 24 | $recordToHandle->expects($this->once())->method('setValue')->with($fieldName, $categoryRootIdHandled); 25 | $recordToHandle->expects($this->once())->method('getFields')->will($this->returnValue([$fieldName])); 26 | $oppositeRecord = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 27 | ->disableOriginalConstructor() 28 | ->getMock(); 29 | $handler = new \Migration\Handler\Settings\CategoryRootId(); 30 | $handler->setField($fieldName); 31 | $handler->handle($recordToHandle, $oppositeRecord); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/Settings/TemplateTest.php: -------------------------------------------------------------------------------- 1 | createPartialMock( 20 | \Migration\ResourceModel\Record::class, 21 | ['getValue', 'setValue', 'getFields'] 22 | ); 23 | $recordToHandle->expects($this->once())->method('getValue')->with($fieldName)->willReturn($templateOldFashion); 24 | $recordToHandle->expects($this->once())->method('setValue')->with($fieldName, $templateNewStyle); 25 | $recordToHandle->expects($this->once())->method('getFields')->will($this->returnValue([$fieldName])); 26 | $oppositeRecord = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 27 | ->disableOriginalConstructor() 28 | ->getMock(); 29 | $oppositeRecord->expects($this->once())->method('getValue')->with($fieldName)->willReturn($templateNewStyle); 30 | $handler = new \Migration\Handler\Settings\Template(); 31 | $handler->setField($fieldName); 32 | $handler->handle($recordToHandle, $oppositeRecord); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Handler/Settings/UrlSuffixTest.php: -------------------------------------------------------------------------------- 1 | createPartialMock( 20 | \Migration\ResourceModel\Record::class, 21 | ['getValue', 'setValue', 'getFields'] 22 | ); 23 | $recordToHandle->expects($this->once())->method('getValue')->with($fieldName)->willReturn($urlSuffix); 24 | $recordToHandle->expects($this->once())->method('setValue')->with($fieldName, $urlSuffixHandled); 25 | $recordToHandle->expects($this->once())->method('getFields')->will($this->returnValue([$fieldName])); 26 | $oppositeRecord = $this->getMockBuilder(\Migration\ResourceModel\Record::class) 27 | ->disableOriginalConstructor() 28 | ->getMock(); 29 | $handler = new \Migration\Handler\Settings\UrlSuffix(); 30 | $handler->setField($fieldName); 31 | $handler->handle($recordToHandle, $oppositeRecord); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/ResourceModel/StructureTest.php: -------------------------------------------------------------------------------- 1 | structure = new \Migration\ResourceModel\Structure(['id' => 'int', 'name' => 'varchar']); 21 | } 22 | 23 | /** 24 | * @return void 25 | */ 26 | public function testGetFields() 27 | { 28 | $this->assertEquals(['id' => 'int', 'name' => 'varchar'], $this->structure->getFields()); 29 | } 30 | 31 | /** 32 | * @return void 33 | */ 34 | public function testHasField() 35 | { 36 | $this->assertTrue($this->structure->hasField('name')); 37 | } 38 | 39 | /** 40 | * @return void 41 | */ 42 | public function testNotHasField() 43 | { 44 | $this->assertFalse($this->structure->hasField('new_name')); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/Step/CustomCustomerAttributesTest.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | catalog/product_widget_link 12 | Magento\Catalog\Block\Product\Widget\Link 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/eav-attribute-groups.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | msrp_enabled 12 | url_key 13 | url_key 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/eav-document-groups.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | eav_attribute_group 12 | eav_attribute_set 13 | 14 | 15 | catalog_eav_attribute 16 | customer_eav_attribute 17 | eav_entity_type 18 | 19 | 20 | catalog_category_entity_datetime 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/invalid-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | map-file.xml 19 | settings-map-file.xml 20 | custom_option_value 21 | 22 | 23 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/map-invalid.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | 13 | source-document 14 | dest-document 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | source-document.field1 23 | 24 | 25 | source-document.field-with-handler 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/settings-invalid.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | path/to/ignore* 13 | 14 | 15 | exact/path/to/ignore 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | path/to/ignore* 13 | 14 | 15 | exact/path/to/ignore 16 | 17 | 18 | renamed/path/to/ignore 19 | 20 | 21 | handled/path/to/ignore 22 | 23 | 24 | path/to/rename 25 | new/path/renamed 26 | 27 | 28 | renamed/path/to/ignore 29 | new/path/renamed2 30 | 31 | 32 | 33 | 34 | some/key/to/change 35 | 36 | 37 | 38 | handled/path/to/ignore 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /tests/unit/testsuite/Migration/_files/test-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 11 | 12 | Migration\Step\SomeStep\Integrity 13 | Migration\Step\SomeStep\Volume 14 | 15 | 16 | Migration\Step\SomeStep\Integrity 17 | Migration\Step\SomeStep\Volume 18 | 19 | 20 | 21 | 22 | Migration\Step\SomeStep\Integrity 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | map-file.xml 33 | eav-map-file.xml 34 | etc/map-log.xml 35 | etc/settings.xml 36 | map-sales.xml 37 | 100 38 | custom_option_value 39 | 40 | 41 | 42 | 43 | --------------------------------------------------------------------------------