public function deleteUpperMigrationClasses(Bundle $bundle, $driverName, $referenceVersion)
    {
        $migrations = new \DirectoryIterator("{$bundle->getPath()}/Migrations/{$driverName}");
        $deletedVersions = array();

        foreach ($migrations as $migration) {
            if (preg_match('#Version(\d+)\.php#', $migration->getFilename(), $matches)) {
                if ($matches[1] > $referenceVersion) {
                    $this->fileSystem->remove(array($migration->getPathname()));
                    $deletedVersions[] = $migration->getFilename();
                }
            }
        }

        return $deletedVersions;
    }