Fix: Updating MIgrateImportCommand to accept language for import

This commit is contained in:
2026-09-24 21:41:11 +03:00
parent c7035d6782
commit b4e9b8a4a9
9 changed files with 140 additions and 35 deletions
+11
View File
@@ -4,11 +4,22 @@ namespace Modules\Core\MigrateImport;
class ImportSpec
{
/**
* @param ?string $locale The language the export file's own text
* (product titles, descriptions, option names, ...) is actually
* written in — asked of the operator at import time (see
* Command\MigrateImportCommand), since an export has no reliable
* way to declare its own language and it does not necessarily match
* this store's Lunar\Models\Language::getDefault(). Null for a
* source/type this doesn't apply to (e.g. an API-based import with
* no free-text file to attribute a single language to).
*/
public function __construct(
public readonly string $source,
public readonly string $type,
public readonly ?string $filePath = null,
public readonly ?array $credentials = null,
public readonly ?string $locale = null,
) {
}
}