|
1 | | -# Shopware Migration Assistant (SwagMigrationAssistant) |
| 1 | +# SwagMigrationAssistant |
2 | 2 |
|
3 | | -## License |
| 3 | +The Shopware Migration Assistant establishes a connection between a data source and Shopware 6 and guides you step by step through the migration process. |
4 | 4 |
|
5 | | -The MIT License (MIT). Please see [License File](LICENSE) for more information. |
| 5 | +It supports migrating numerous datasets (products, manufacturers, customers, …) and updating them at any time. Before a migration starts, the assistant runs a data check and supports creating “mappings” to resolve missing/unassignable data (for example: assign missing manufacturers to a default manufacturer) to avoid data loss. |
6 | 6 |
|
7 | | -## Description |
| 7 | +## Overview |
8 | 8 |
|
9 | | -The Shopware Migration Assistant establishes a connection between a data source (e.g. Shopware 5 shop) and Shopware 6 and guides you step by step through the migration process. |
| 9 | +- [Documentation](#documentation) |
| 10 | +- [Shopware 5](#shopware-5-migration-connector) |
| 11 | +- [Requirements](#requirements) |
| 12 | +- [Installation](#installation-shopware-6-project) |
| 13 | +- [Developer setup](#developer-setup) |
| 14 | +- [Common workflows](#common-workflows) |
| 15 | +- [Release notes / upgrades](#release-notes--upgrades) |
| 16 | +- [License](#license) |
10 | 17 |
|
11 | | -You can migrate numerous datasets – e.g. products, manufacturers, customers, etc. – from your existing shop system to Shopware 6 and update them at any time. |
| 18 | +## Documentation |
12 | 19 |
|
13 | | -The assistant also makes it possible to connect two systems in order to make the transition as easy as possible. |
| 20 | +- **User documentation**: [Shopware Migration docs](https://docs.shopware.com/en/migration-en) |
| 21 | +- **Developer documentation**: [Migration Assistant developer docs](https://developer.shopware.com/docs/products/extensions/migration-assistant/) |
14 | 22 |
|
| 23 | +## Shopware 5: Migration Connector |
15 | 24 |
|
| 25 | +When migrating from Shopware 5, you can migrate locally or connect via the “Migration Connector” plugin from the Shopware Store: |
16 | 26 |
|
17 | | -Once the connection has been established, it saves automatically so that it can be accessed at any time. After the first complete migration, individual datasets can also be migrated or updated as needed. |
| 27 | +- **Migration Connector**: [Shopware Store listing](https://store.shopware.com/de/swag226607479310f/migration-connector.html) |
18 | 28 |
|
| 29 | +The connector provides API endpoints so Shopware 6 can establish a secure connection to the Shopware 5 shop. Keep it enabled as long as you need updates/delta migrations. |
19 | 30 |
|
| 31 | +## Requirements |
20 | 32 |
|
21 | | -Before the migration takes place, the assistant performs a data check to determine missing or unassignable datasets. Within the scope of this check it may be necessary to create so-called “mapping”, which replaces any missing data with an assignment (e.g. missing manufacturer data automatically reverts to the default manufacturer) – this ensures you can quickly migrate without losing any data. |
| 33 | +- **Shopware**: `shopware/core` (see version here [`composer.json`](composer.json)) |
| 34 | +- **Node.js / npm**: required for administration and JS tooling (lint/unit/acceptance) |
| 35 | +- **MySQL client**: required for importing Shopware 5 fixture data (optional) |
22 | 36 |
|
| 37 | +## Installation (Shopware 6 project) |
23 | 38 |
|
| 39 | +Expected path (relative to your Shopware 6 project root) for the plugin: |
24 | 40 |
|
25 | | -## Info for Shopware 5 users: |
| 41 | +`custom/plugins/SwagMigrationAssistant` |
26 | 42 |
|
27 | | -In migrating your Shopware 5 shop, you can either perform the migration locally or use the “Migration Connector” plugin [Link to the plugin](https://store.shopware.com/de/swag226607479310f/migration-connector.html). |
| 43 | +From the shopware root directory: |
28 | 44 |
|
| 45 | +```bash |
| 46 | +bin/console plugin:refresh |
| 47 | +bin/console plugin:install -a -c SwagMigrationAssistant |
| 48 | +``` |
29 | 49 |
|
| 50 | +Alternatively, use the provided shortcut: |
30 | 51 |
|
31 | | -The Migration Connector provides API endpoints that allow Shopware 6 to establish a secure data connection with the active Shopware 5 shop. As long as you are using Shopware 6, you should leave the plugin enabled. This is the only way to update the data at any time. |
| 52 | +```bash |
| 53 | +composer setup |
| 54 | +``` |
32 | 55 |
|
| 56 | +## Developer setup |
33 | 57 |
|
| 58 | +- **Install JS dependencies** (administration + Jest + Playwright project): |
34 | 59 |
|
35 | | -## Get started with the Migration Assistant: |
| 60 | +```bash |
| 61 | +composer npm:init |
| 62 | +``` |
36 | 63 |
|
| 64 | +- **Install git pre-commit hook** (optional): |
37 | 65 |
|
| 66 | +```bash |
| 67 | +./bin/setup.sh |
| 68 | +``` |
38 | 69 |
|
39 | | -- Download the Shopware Migration Assistant from the Community Store |
40 | | -- Activate the plugin in your Shopware 6 installation – this can be done in the Plugin Manager under “Purchases”. Alternatively, you can use the Plugin Manager to upload the plugin ZIP file. |
41 | | -- The Migration Assistant will then guide you through the migration process. |
| 70 | +## Common workflows |
42 | 71 |
|
43 | | -## Documentation |
| 72 | +### Linting & formatting |
| 73 | + |
| 74 | +Run everything (PHP + admin): |
| 75 | + |
| 76 | +```bash |
| 77 | +composer lint |
| 78 | +``` |
| 79 | + |
| 80 | +Run individual parts: |
| 81 | + |
| 82 | +```bash |
| 83 | +composer ecs |
| 84 | +composer phpstan |
| 85 | +composer phpunit |
| 86 | +composer admin:lint # eslint |
| 87 | +composer admin:format # prettier |
| 88 | +``` |
| 89 | + |
| 90 | +### Tests |
| 91 | + |
| 92 | +- **PHPUnit**: |
| 93 | + |
| 94 | +```bash |
| 95 | +composer phpunit |
| 96 | +``` |
| 97 | + |
| 98 | +- **Administration unit tests (Jest)**: |
| 99 | + |
| 100 | +```bash |
| 101 | +composer admin:unit |
| 102 | +``` |
| 103 | + |
| 104 | +- **Acceptance tests (Playwright)**: |
| 105 | + |
| 106 | +```bash |
| 107 | +composer admin:acceptance |
| 108 | +``` |
| 109 | + |
| 110 | +More details (including Playwright install steps) can be found in the [acceptance tests README](tests/acceptance/README.md). |
| 111 | + |
| 112 | +### Import Shopware 5 fixture database (optional) |
| 113 | + |
| 114 | +This imports `tests/_fixtures/database/sw55.sql` into the database configured in your Shopware root `.env` via `DATABASE_URL`. |
| 115 | + |
| 116 | +```bash |
| 117 | +composer install5db |
| 118 | +``` |
| 119 | + |
| 120 | +## Release notes / upgrades |
| 121 | + |
| 122 | +- **Changelog**: [`CHANGELOG.md`](CHANGELOG.md) |
| 123 | +- **Breaking changes**: [`UPGRADE.md`](UPGRADE.md) |
| 124 | + |
| 125 | +## License |
44 | 126 |
|
45 | | -If you need further information. You can have a look at our [user documentation](https://docs.shopware.com/en/migration-en) and our [developer documentation](https://developer.shopware.com/docs/products/extensions/migration-assistant/) |
| 127 | +`MIT` See [`LICENSE`](LICENSE). |
0 commit comments