Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Copy link
Member Author

@vintagesucks vintagesucks Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: Don't squash and merge this PR

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### 1. Why is this change necessary?

// Please link to the relevant issues, if they exists, or explain the solved issue here. e.g.
// closes https://github.com/shopware/shopware/issues/{ISSUE_NUMBER}

### 2. What does this change do, exactly?

// Shortly explain how your change solves the issue
// If the issue has more than one obvious solution,
// shortly explain your reasoning for your chosen approach

### 3. Describe each step to reproduce the issue or behaviour.


### 5. Checklist

- [ ] I have created the PR in draft status and only open it when it's ready for review
- [ ] If the change is large: I have thought about splitting it up into smaller PRs
- [ ] I have written tests and if it's a bug fix verified that they fail without my change or that new code is covered by tests
- [ ] I have updated developer-facing release notes if this change affects external developers
- [ ] I have written or adjusted the documentation according to my changes
- [ ] I added the correct package annotation to each `src` file (not strictly necessary for tests)
- [ ] This change has code comments where appropriate, especially for non-obvious lines of code
- [ ] Ensure the pull request title as well as first commit follows conventional commits
- [ ] I have thought about well-defined extension points and marked everything else as `@internal` / `@private`
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
- #11808 - Removed CLI commands `migration:abort`, `migration:get-progress`, and `migration:start`. You have to start the migration via the Administration UI, it still runs in the background message queue
- #11808 - Checksum reset and migration data cleanup now run asynchronously via message queue.

# 15.0.4
- Added `shopIdV2` to the list of ignored system config entries for Shopware 6 connections
- Media processing has been simplified so that the UI can show the actual progress

# 15.0.3

- Fixed translations of error groups missing details like the entity
Expand Down Expand Up @@ -63,10 +67,10 @@

# 13.1.0

- MIG-981 - Media migration now uses the system's temporary directory to download files
- MIG-1016 - Improves the warnings for different default currency and default language in the data selection
- MIG-1016 - Added new block `{% block swag_migration_confirm_warning_alert %}` in `swag-migration/component/card/swag-migration-confirm-warning/swag-migration-confirm-warning.html.twig`
- MIG-1037 - Fixes a rare issue that in certain situations not all entities are migrated (some were skipped). Was detected during translations of SW5
- MIG-981 - Media migration now uses the system's temporary directory to download files.
- MIG-1016 - Improves the warnings for different default currency and default language in the data selection.
- MIG-1016 - Added new block `{% block swag_migration_confirm_warning_alert %}` in `swag-migration/component/card/swag-migration-confirm-warning/swag-migration-confirm-warning.html.twig`.
- MIG-1037 - Fixes a rare issue that in certain situations not all entities are migrated (some were skipped). Was detected during translations of SW5.

# 13.0.0

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG_de-DE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
- #11808 - CLI-Befehle `migration:abort`, `migration:get-progress` und `migration:start` entfernt. Die Migration kann über die Administrations-UI gestartet werden und wird weiterhin in der Message-Queue ausgeführt.
- #11808 - Zurücksetzen der Prüfsummen und Bereinigung der Migrationsdaten erfolgen jetzt asynchron über die Message Queue.

# 15.0.4
- `shopIdV2` wurde zur Liste der ignorierten Systemkonfigurationseinträge für Shopware 6-Verbindungen hinzugefügt
- Die Medienverarbeitung wurde vereinfacht, sodass die Benutzeroberfläche den tatsächlichen Fortschritt anzeigen kann

# 15.0.3

- Übersetzungen von Fehlergruppen behoben, welche Details wie den Entitätsnamen nicht darstellten
Expand Down
3 changes: 3 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@
- Added fields `profile_name`, `gateway_name` and `user_fixable` to log definition `SwagMigrationAssistant\Migration\Logging\SwagMigrationLoggingDefinition`
- Added properties `profileName`, `gatewayName` and `userFixable` to log entity `SwagMigrationAssistant\Migration\Logging\SwagMigrationLoggingEntity`

# 14.0.4
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a typo that was missed in #96 (I think this should be 15.0.4), will create a follow-up PR fixing that

- Media processing has been simplified. It's no longer done in parallel messages. The migration UI reflects the media migration progress more accurately. When the step is marked as complete, all media are migrated. No need to wait for additional messages to finish.

# 14.0.0

- [BREAKING] MIG-1053 - Removed ability to set the `verify` flag for the guzzle API client. This is now always true by default.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swag/migration-assistant",
"description": "Migration plugin for shopware/platform",
"version": "15.0.3",
"version": "15.0.4",
"type": "shopware-platform-plugin",
"license": "MIT",
"authors": [
Expand Down
4 changes: 2 additions & 2 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
ignoreErrors:
-
message: '#^swag_migration_data\.run association has a configured autoload\=\=\=true, this is forbidden for platform integrations$#'
message: "#^swag_migration_data\\.run association has a configured autoload\\=\\=\\=true, this is forbidden for platform integrations$#"
identifier: shopware.associationAutoload
count: 1
path: src/Migration/Data/SwagMigrationDataDefinition.php
Expand Down Expand Up @@ -955,7 +955,7 @@ parameters:
path: src/Profile/Shopware6/Converter/NumberRangeConverter.php

-
message: '#^Method SwagMigrationAssistant\\Profile\\Shopware6\\Converter\\PropertyGroupConverter\:\:convertOption\(\) has parameter \$option with no value type specified in iterable type array\.$#'
message: "#^Method SwagMigrationAssistant\\\\Profile\\\\Shopware6\\\\Converter\\\\PropertyGroupConverter\\:\\:convertOption\\(\\) has parameter \\$option with no value type specified in iterable type array\\.$#"
identifier: missingType.iterableValue
count: 1
path: src/Profile/Shopware6/Converter/PropertyGroupConverter.php
Expand Down
51 changes: 51 additions & 0 deletions src/DataProvider/Provider/Data/MailHeaderFooterProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace SwagMigrationAssistant\DataProvider\Provider\Data;

use Shopware\Core\Content\MailTemplate\Aggregate\MailHeaderFooter\MailHeaderFooterCollection;
use Shopware\Core\Framework\Context;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepository;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Sorting\FieldSorting;
use Shopware\Core\Framework\Log\Package;
use SwagMigrationAssistant\Migration\DataSelection\DefaultEntities;

#[Package('fundamentals@after-sales')]
class MailHeaderFooterProvider extends AbstractProvider
{
/**
* @param EntityRepository<MailHeaderFooterCollection> $mailHeaderFooterRepo
*/
public function __construct(private readonly EntityRepository $mailHeaderFooterRepo)
{
}

public function getIdentifier(): string
{
return DefaultEntities::MAIL_HEADER_FOOTER;
}

public function getProvidedData(int $limit, int $offset, Context $context): array
{
$criteria = new Criteria();
$criteria->setLimit($limit);
$criteria->setOffset($offset);
$criteria->addAssociation('translations');
$criteria->addSorting(new FieldSorting('id'));
$result = $this->mailHeaderFooterRepo->search($criteria, $context);

return $this->cleanupSearchResult($result, [
'mailHeaderFooterId',
]);
}

public function getProvidedTotal(Context $context): int
{
return $this->readTotalFromRepo($this->mailHeaderFooterRepo, $context);
}
}
1 change: 1 addition & 0 deletions src/DataProvider/Provider/Data/SystemConfigProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SystemConfigProvider extends AbstractProvider
public static array $CONFIG_KEY_BLOCK_LIST = [
// shop instance, license related or consent data
'core.app.shopId',
'core.app.shopIdV2',
'core.basicInformation.shopName',
'core.basicInformation.activeCaptchas',
'core.basicInformation.activeCaptchasV2',
Expand Down
5 changes: 5 additions & 0 deletions src/DependencyInjection/dataProvider.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@
<tag name="shopware.dataProvider.provider"/>
</service>

<service id="SwagMigrationAssistant\DataProvider\Provider\Data\MailHeaderFooterProvider">
<argument type="service" id="mail_header_footer.repository"/>
<tag name="shopware.dataProvider.provider"/>
</service>

<service id="SwagMigrationAssistant\DataProvider\Provider\Data\MailTemplateProvider">
<argument type="service" id="mail_template.repository"/>
<tag name="shopware.dataProvider.provider"/>
Expand Down
20 changes: 4 additions & 16 deletions src/DependencyInjection/migration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,6 @@
<argument type="service" id="SwagMigrationAssistant\Migration\ErrorResolution\MigrationErrorResolutionService"/>
</service>

<service id="SwagMigrationAssistant\Migration\Service\MediaFileProcessorService" public="true">
<argument type="service" id="messenger.default_bus"/>
<argument type="service" id="SwagMigrationAssistant\Migration\DataSelection\DataSet\DataSetRegistry"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Logging\LoggingService"/>
<argument type="service" id="Doctrine\DBAL\Connection"/>
</service>

<service id="SwagMigrationAssistant\Migration\Media\MediaFileProcessorRegistry">
<argument type="tagged_iterator" tag="shopware.migration.media_file_processor"/>
</service>
Expand Down Expand Up @@ -314,14 +307,6 @@
<argument type="service" id="swag_migration_connection.repository"/>
</service>

<service id="SwagMigrationAssistant\Migration\MessageQueue\Handler\ProcessMediaHandler">
<argument type="service" id="swag_migration_run.repository"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Media\MediaFileProcessorRegistry"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Logging\LoggingService"/>
<argument type="service" id="SwagMigrationAssistant\Migration\MigrationContextFactory"/>
<tag name="messenger.message_handler"/>
</service>

<service id="SwagMigrationAssistant\Migration\MessageQueue\Handler\TruncateMigrationHandler">
<argument type="service" id="Doctrine\DBAL\Connection"/>
<argument type="service" id="messenger.default_bus"/>
Expand Down Expand Up @@ -409,8 +394,11 @@

<service id="SwagMigrationAssistant\Migration\MessageQueue\Handler\Processor\MediaProcessingProcessor"
parent="SwagMigrationAssistant\Migration\MessageQueue\Handler\Processor\AbstractProcessor">
<argument type="service" id="SwagMigrationAssistant\Migration\Service\MediaFileProcessorService"/>
<argument type="service" id="messenger.default_bus"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Logging\LoggingService"/>
<argument type="service" id="Doctrine\DBAL\Connection"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Media\MediaFileProcessorRegistry"/>
<argument type="service" id="SwagMigrationAssistant\Migration\DataSelection\DataSet\DataSetRegistry"/>

<tag name="shopware.migration.processor"/>
</service>
Expand Down
1 change: 1 addition & 0 deletions src/DependencyInjection/shopware.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
<argument type="service" id="SwagMigrationAssistant\Migration\Media\MediaFileService"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Mapping\Lookup\MediaDefaultFolderLookup"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Mapping\Lookup\DocumentTypeLookup"/>
<argument type="service" id="SwagMigrationAssistant\Migration\Mapping\Lookup\GlobalDocumentBaseConfigLookup"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware\Converter\CustomerGroupAttributeConverter"
Expand Down
21 changes: 21 additions & 0 deletions src/DependencyInjection/shopware6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@
<tag name="shopware.migration.converter"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\Converter\MailHeaderFooterConverter"
parent="SwagMigrationAssistant\Profile\Shopware6\Converter\ShopwareConverter">
<tag name="shopware.migration.converter"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\Converter\MailTemplateConverter"
parent="SwagMigrationAssistant\Profile\Shopware6\Converter\ShopwareMediaConverter">
<argument type="service" id="SwagMigrationAssistant\Migration\Mapping\Lookup\MailTemplateTypeLookup"/>
Expand Down Expand Up @@ -478,6 +483,10 @@
<tag name="shopware.migration.data_set"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\DataSelection\DataSet\MailHeaderFooterDataSet">
<tag name="shopware.migration.data_set"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\DataSelection\DataSet\MailTemplateDataSet">
<tag name="shopware.migration.data_set"/>
</service>
Expand Down Expand Up @@ -725,6 +734,11 @@
<tag name="shopware.migration.reader"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\Gateway\Api\Reader\MailHeaderFooterReader"
parent="SwagMigrationAssistant\Profile\Shopware6\Gateway\Api\Reader\ApiReader">
<tag name="shopware.migration.reader"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\Gateway\Api\Reader\MailTemplateReader"
parent="SwagMigrationAssistant\Profile\Shopware6\Gateway\Api\Reader\ApiReader">
<tag name="shopware.migration.reader"/>
Expand Down Expand Up @@ -919,6 +933,13 @@
<tag name="shopware.migration.writer"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\Writer\MailHeaderFooterWriter"
parent="SwagMigrationAssistant\Migration\Writer\AbstractWriter">
<argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\Write\EntityWriter"/>
<argument type="service" id="Shopware\Core\Content\MailTemplate\Aggregate\MailHeaderFooter\MailHeaderFooterDefinition"/>
<tag name="shopware.migration.writer"/>
</service>

<service id="SwagMigrationAssistant\Profile\Shopware6\Writer\MailTemplateWriter"
parent="SwagMigrationAssistant\Migration\Writer\AbstractWriter">
<argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\Write\EntityWriter"/>
Expand Down
2 changes: 2 additions & 0 deletions src/Migration/DataSelection/DefaultEntities.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ final class DefaultEntities

final public const LOCALE = 'locale';

final public const MAIL_HEADER_FOOTER = 'mail_header_footer';

final public const MAIL_TEMPLATE = 'mail_template';

final public const MAIL_TEMPLATE_TYPE = 'mail_template_type';
Expand Down
25 changes: 25 additions & 0 deletions src/Migration/Mapping/Lookup/GlobalDocumentBaseConfigLookup.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ class GlobalDocumentBaseConfigLookup implements ResetInterface
*/
private array $cache = [];

/**
* @var array<string, array<string, mixed>|null>
*/
private array $configCache = [];

/**
* @param EntityRepository<DocumentBaseConfigCollection> $documentBaseConfigRepository
*
Expand Down Expand Up @@ -51,8 +56,28 @@ public function get(string $documentTypeId, Context $context): ?string
return $baseConfigId;
}

/**
* @return array<string, mixed>|null
*/
public function getBaseConfig(string $baseConfigId, Context $context): ?array
{
if (\array_key_exists($baseConfigId, $this->configCache)) {
return $this->configCache[$baseConfigId];
}

$criteria = new Criteria([$baseConfigId]);

$baseConfig = $this->documentBaseConfigRepository->search($criteria, $context)->first();

$config = $baseConfig?->getConfig();
$this->configCache[$baseConfigId] = $config;

return $config;
}

public function reset(): void
{
$this->cache = [];
$this->configCache = [];
}
}
4 changes: 2 additions & 2 deletions src/Migration/Media/Processor/HttpDownloadServiceBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use SwagMigrationAssistant\Migration\Media\MediaFileProcessorInterface;
use SwagMigrationAssistant\Migration\Media\MediaProcessWorkloadStruct;
use SwagMigrationAssistant\Migration\Media\SwagMigrationMediaFileCollection;
use SwagMigrationAssistant\Migration\MessageQueue\Handler\ProcessMediaHandler;
use SwagMigrationAssistant\Migration\MessageQueue\Handler\Processor\MediaProcessingProcessor;
use SwagMigrationAssistant\Migration\MigrationContextInterface;

/**
Expand Down Expand Up @@ -120,7 +120,7 @@ function (MediaProcessWorkloadStruct $work) use ($uuid) {
$work->setAdditionalData($additionalData);
$work->setErrorCount($work->getErrorCount() + 1);

if ($work->getErrorCount() > ProcessMediaHandler::MEDIA_ERROR_THRESHOLD) {
if ($work->getErrorCount() > MediaProcessingProcessor::MEDIA_ERROR_THRESHOLD) {
$failureUuids[] = $uuid;
$work->setState(MediaProcessWorkloadStruct::ERROR_STATE);

Expand Down
Loading
Loading