lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
private function getRemainingForeignKeyConstraintsRequiringRenamedIndexes(TableDiff $diff)
    {
        if (empty($diff->renamedIndexes) || ! $diff->fromTable instanceof Table) {
            return [];
        }

        $foreignKeys = [];
        /** @var ForeignKeyConstraint[] $remainingForeignKeys */
        $remainingForeignKeys = array_diff_key(
            $diff->fromTable->getForeignKeys(),
            $diff->removedForeignKeys
        );

        foreach ($remainingForeignKeys as $foreignKey) {
            foreach ($diff->renamedIndexes as $index) {
                if ($foreignKey->intersectsIndexColumns($index)) {
                    $foreignKeys[] = $foreignKey;

                    break;
                }
            }
        }

        return $foreignKeys;
    }
private function getRemainingForeignKeyConstraintsRequiringRenamedIndexes(TableDiff $diff)
    {
        if (empty($diff->renamedIndexes) || ! $diff->fromTable instanceof Table) {
            return [];
        }

        $foreignKeys = [];
        /** @var ForeignKeyConstraint[] $remainingForeignKeys */
        $remainingForeignKeys = array_diff_key(
            $diff->fromTable->getForeignKeys(),
            $diff->removedForeignKeys
        );

        foreach ($remainingForeignKeys as $foreignKey) {
            foreach ($diff->renamedIndexes as $index) {
                if ($foreignKey->intersectsIndexColumns($index)) {
                    $foreignKeys[] = $foreignKey;

                    break;
                }
            }
        }

        return $foreignKeys;
    }
private function getRemainingForeignKeyConstraintsRequiringRenamedIndexes ( TableDiff $ diff ) { if ( empty ( $ diff -> renamedIndexes ) || ! $ diff -> fromTable instanceof Table ) { return [ ] ; } $ foreignKeys = [ ] ; /** @var ForeignKeyConstraint[] $remainingForeignKeys */ $ remainingForeignKeys = array_diff_key ( $ diff -> fromTable -> getForeignKeys ( ) , $ diff -> removedForeignKeys ) ; foreach ( $ remainingForeignKeys as $ foreignKey ) { foreach ( $ diff -> renamedIndexes as $ index ) { if ( $ foreignKey -> intersectsIndexColumns ( $ index ) ) { $ foreignKeys [ ] = $ foreignKey ; break ; } } } return $ foreignKeys ; }
Returns the remaining foreign key constraints that require one of the renamed indexes.

"Remaining" here refers to the diff between the foreign keys currently defined in the associated
table and the foreign keys to be removed.

@param TableDiff $diff The table diff to evaluate.

@return ForeignKeyConstraint[]
Returns the remaining foreign key constraints that require one of the renamed indexes .