*/ private AbstractSchemaManager $schemaManager; /** * @param AbstractSchemaManager $schemaManager- */ public function __construct(AbstractSchemaManager $schemaManager, AbstractPlatform $platform) { $this->schemaManager = $schemaManager; $this->platform = $platform; } public function createFromSchema(): Schema { return $this->schemaManager->introspectSchema(); } public function createToSchema(Schema $fromSchema): Schema { return clone $fromSchema; } /** @return string[] */ public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema): array { return $this->platform->getAlterSchemaSQL( $this->schemaManager->createComparator()->compareSchemas($fromSchema, $toSchema) ); } }