public function __construct( private readonly Connection
$connection,
private readonly LoggerInterface
$logger ) { } public function migrate(MigrationSource
$source, ?int
$until = null, ?int
$limit = null
): \Generator
{ $migrations =
$this->
getExecutableMigrations($source,
$until,
$limit);
$this->
setDefaultStorageEngine();
foreach ($migrations as $migration) { if (!
class_exists($migration)) { $this->logger->
notice(sprintf('Migration "%s" does not exists. Ignoring it',
$migration));
continue;
} /** @var MigrationStep $migration */
$migration =
new $migration();