public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider = null)
{
$this->configuration = $configuration;
$this->outputWriter = $configuration->getOutputWriter();
$this->class = $class;
$this->connection = $configuration->getConnection();
$this->migration = new $class($this);
$this->version = $version;
if ($schemaProvider !== null) {
$this->schemaProvider = $schemaProvider;
}
if ($schemaProvider === null) {
$schemaProvider = new SchemaDiffProvider($this->connection->getSchemaManager(), $this->connection->getDatabasePlatform());
$this->schemaProvider = LazySchemaDiffProvider::fromDefaultProxyFacyoryConfiguration($schemaProvider);
}
}