/** * Definition constructor. * @param MigrationInterface $migration * @param null|string|ValueObjectInterface $id Overrides the ID for the migration with the specified ID */ public function __construct(MigrationInterface $migration, $id = null) { if (null === $id) { $id = DeltaId::fromMigration($migration); } else { $id = new DeltaId((string) $id); } $this->id = $id; $this->migration = $migration; }
/** * @param MigrationInterface $migration * @param bool $migrated * @param null|DeltaId $id Optionally force the ID to be something specific. * @param null|MigrationBusInterface $bus */ public function __construct(MigrationInterface $migration, $migrated, DeltaId $id = null, MigrationBusInterface $bus = null) { if (null === $id) { $id = DeltaId::fromMigration($migration); } $this->id = $id; $this->migration = $migration; $this->migrated = (bool) $migrated; $this->setMigrationBus($bus); }