private function getLegacyMigrationDefinition($version, $bundle)
    {
        if (!isset($this->activeBundles[$bundle])) {
            return false;
        }

        $versionsDir = $this->activeBundles[$bundle] . '/' . $this->legacyMigrationsDir;
        $versionDefinitions = glob($versionsDir . "/$version*");

        if (!is_array($versionDefinitions)) {
            return false;
        }

        foreach ($versionDefinitions as $key => $versionDefinition) {
            if (!in_array(pathinfo($versionDefinition, PATHINFO_EXTENSION), array('php', 'yml', 'sql'))) {
                unset($versionDefinitions[$key]);
            }
        }

        if (empty($versionDefinitions)) {
            return false;
        }

        return $versionDefinitions[0];
    }
private function getLegacyMigrationDefinition($version, $bundle)
    {
        if (!isset($this->activeBundles[$bundle])) {
            return false;
        }

        $versionsDir = $this->activeBundles[$bundle] . '/' . $this->legacyMigrationsDir;
        $versionDefinitions = glob($versionsDir . "/$version*");

        if (!is_array($versionDefinitions)) {
            return false;
        }

        foreach ($versionDefinitions as $key => $versionDefinition) {
            if (!in_array(pathinfo($versionDefinition, PATHINFO_EXTENSION), array('php', 'yml', 'sql'))) {
                unset($versionDefinitions[$key]);
            }
        }

        if (empty($versionDefinitions)) {
            return false;
        }

        return $versionDefinitions[0];
    }
private function getLegacyMigrationDefinition ( $ version , $ bundle ) { if ( ! isset ( $ this -> activeBundles [ $ bundle ] ) ) { return false ; } $ versionsDir = $ this -> activeBundles [ $ bundle ] . '/' . $ this -> legacyMigrationsDir ; $ versionDefinitions = glob ( $ versionsDir . "/$version*" ) ; if ( ! is_array ( $ versionDefinitions ) ) { return false ; } foreach ( $ versionDefinitions as $ key => $ versionDefinition ) { if ( ! in_array ( pathinfo ( $ versionDefinition , PATHINFO_EXTENSION ) , array ( 'php' , 'yml' , 'sql' ) ) ) { unset ( $ versionDefinitions [ $ key ] ) ; } } if ( empty ( $ versionDefinitions ) ) { return false ; } return $ versionDefinitions [ 0 ] ; }
Attempts to find the migration definition file. If more than one matches, the 1st found is returned
@param string $version
@param string $bundle
@return string|false
Attempts to find the migration definition file . If more than one matches the 1st found is returned