Skip to content

FrozenDependencies thrown when trying to run twice migration commands in the same runtime #1502

@nikophil

Description

@nikophil

BC Break Report

Q A
BC Break yes
Version 3.8.0

Summary

Hello,

in zenstruck/foundry, we reset the database by using migrations. We allow to configure multiple configuration files for the migrations, which will basically result in a loop where we call doctrine:migration:migrate through doctrine/doctrine-migration-bundle.

Since this PR, this behavior is impossible because the second call to doctrine:migration:migrate will say the dependencies are frozen. (see zenstruck/foundry#889)

Maybe we could "unfroze" the DependencyFactory as soon as the migrations are run?

(I know another issue exists regarding FrozenDependencies exception, but I think the problem is different here)

How to reproduce

just call twice the migration mechanism with different configurations in the same runtime

thank you for you help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions