Merge remote-tracking branch 'origin/1.6.x' into feat-bulk-operations

This commit is contained in:
Jake Barnby 2025-05-03 01:45:14 +12:00
commit bae0676a62
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -34,6 +34,13 @@ class Migrations extends Action
protected Document $project;
/**
* Cached for performance.
*
* @var array<string, int>
*/
protected array $sourceReport = [];
/**
* @var callable
*/
@ -101,7 +108,7 @@ class Migrations extends Action
$source = $migration->getAttribute('source');
$credentials = $migration->getAttribute('credentials');
return match ($source) {
$migrationSource = match ($source) {
Firebase::getName() => new Firebase(
json_decode($credentials['serviceAccount'], true),
),
@ -130,6 +137,10 @@ class Migrations extends Action
),
default => throw new \Exception('Invalid source type'),
};
$this->sourceReport = $migrationSource->report();
return $migrationSource;
}
/**
@ -245,8 +256,6 @@ class Migrations extends Action
$source = $this->processSource($migration);
$destination = $this->processDestination($migration, $tempAPIKey);
$source->report();
$transfer = new Transfer(
$source,
$destination