public function getMigrationStatus()
    {
        $configuration = $this->getMigrationConfiguration();

        $executedMigrations = $configuration->getMigratedVersions();
        $availableMigrations = $configuration->getAvailableVersions();
        $executedUnavailableMigrations = array_diff($executedMigrations, $availableMigrations);

        $numExecutedUnavailableMigrations = count($executedUnavailableMigrations);
        $numNewMigrations = count(array_diff($availableMigrations, $executedMigrations));

        return [
            'Name' => $configuration->getName() ? $configuration->getName() : 'Doctrine Database Migrations',
            'Database Driver' => $configuration->getConnection()->getDriver()->getName(),
            'Database Name' => $configuration->getConnection()->getDatabase(),
            'Configuration Source' => 'manually configured',
            'Version Table Name' => $configuration->getMigrationsTableName(),
            'Version Column Name' => $configuration->getMigrationsColumnName(),
            'Migrations Namespace' => $configuration->getMigrationsNamespace(),
            'Migrations Target Directory' => $configuration->getMigrationsDirectory(),
            'Previous Version' => $this->getFormattedVersionAlias('prev', $configuration),
            'Current Version' => $this->getFormattedVersionAlias('current', $configuration),
            'Next Version' => $this->getFormattedVersionAlias('next', $configuration),
            'Latest Version' => $this->getFormattedVersionAlias('latest', $configuration),
            'Executed Migrations' => count($executedMigrations),
            'Executed Unavailable Migrations' => $numExecutedUnavailableMigrations,
            'Available Migrations' => count($availableMigrations),
            'New Migrations' => $numNewMigrations,
        ];
    }
public function getMigrationStatus()
    {
        $configuration = $this->getMigrationConfiguration();

        $executedMigrations = $configuration->getMigratedVersions();
        $availableMigrations = $configuration->getAvailableVersions();
        $executedUnavailableMigrations = array_diff($executedMigrations, $availableMigrations);

        $numExecutedUnavailableMigrations = count($executedUnavailableMigrations);
        $numNewMigrations = count(array_diff($availableMigrations, $executedMigrations));

        return [
            'Name' => $configuration->getName() ? $configuration->getName() : 'Doctrine Database Migrations',
            'Database Driver' => $configuration->getConnection()->getDriver()->getName(),
            'Database Name' => $configuration->getConnection()->getDatabase(),
            'Configuration Source' => 'manually configured',
            'Version Table Name' => $configuration->getMigrationsTableName(),
            'Version Column Name' => $configuration->getMigrationsColumnName(),
            'Migrations Namespace' => $configuration->getMigrationsNamespace(),
            'Migrations Target Directory' => $configuration->getMigrationsDirectory(),
            'Previous Version' => $this->getFormattedVersionAlias('prev', $configuration),
            'Current Version' => $this->getFormattedVersionAlias('current', $configuration),
            'Next Version' => $this->getFormattedVersionAlias('next', $configuration),
            'Latest Version' => $this->getFormattedVersionAlias('latest', $configuration),
            'Executed Migrations' => count($executedMigrations),
            'Executed Unavailable Migrations' => $numExecutedUnavailableMigrations,
            'Available Migrations' => count($availableMigrations),
            'New Migrations' => $numNewMigrations,
        ];
    }
public function getMigrationStatus ( ) { $ configuration = $ this -> getMigrationConfiguration ( ) ; $ executedMigrations = $ configuration -> getMigratedVersions ( ) ; $ availableMigrations = $ configuration -> getAvailableVersions ( ) ; $ executedUnavailableMigrations = array_diff ( $ executedMigrations , $ availableMigrations ) ; $ numExecutedUnavailableMigrations = count ( $ executedUnavailableMigrations ) ; $ numNewMigrations = count ( array_diff ( $ availableMigrations , $ executedMigrations ) ) ; return [ 'Name' => $ configuration -> getName ( ) ? $ configuration -> getName ( ) : 'Doctrine Database Migrations' , 'Database Driver' => $ configuration -> getConnection ( ) -> getDriver ( ) -> getName ( ) , 'Database Name' => $ configuration -> getConnection ( ) -> getDatabase ( ) , 'Configuration Source' => 'manually configured' , 'Version Table Name' => $ configuration -> getMigrationsTableName ( ) , 'Version Column Name' => $ configuration -> getMigrationsColumnName ( ) , 'Migrations Namespace' => $ configuration -> getMigrationsNamespace ( ) , 'Migrations Target Directory' => $ configuration -> getMigrationsDirectory ( ) , 'Previous Version' => $ this -> getFormattedVersionAlias ( 'prev' , $ configuration ) , 'Current Version' => $ this -> getFormattedVersionAlias ( 'current' , $ configuration ) , 'Next Version' => $ this -> getFormattedVersionAlias ( 'next' , $ configuration ) , 'Latest Version' => $ this -> getFormattedVersionAlias ( 'latest' , $ configuration ) , 'Executed Migrations' => count ( $ executedMigrations ) , 'Executed Unavailable Migrations' => $ numExecutedUnavailableMigrations , 'Available Migrations' => count ( $ availableMigrations ) , 'New Migrations' => $ numNewMigrations , ] ; }
Returns the current migration status as an array.

@return array
@throws DBALException
Returns the current migration status as an array .