container = $container; $this->migrationFactory = $migrationFactory; } public function createVersion(string $migrationClassName): AbstractMigration { $migration = $this->migrationFactory->createVersion($migrationClassName); if ($migration instanceof ContainerAwareInterface) { $migration->setContainer($this->container); } return $migration; } }