You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MigrationContainer should not assume that symfony container services have been emptied.
A recent update of symfony/dependency-injection > Container::reset() method makes migrations run into an infinite reset loop.
Installation runs into an infinite loop on first call to a migration implementing ResetContainerMigration (see ResetContainerMigrationListener::onPostUp()) : first migration called is UpdateEntityConfigMigration.
Actual Result
On instance of ResetContainerMigration call, ResetContainerMigrationListener calls $this->container->reset();
$this->container is the symfony container that iterates on every existing service that implements ResetInterface and call $service->reset(); on it.
Before symfony/dependency-injection 6.4.12 the Container::reset() method emptied services BEFORE calling "reset()" method on each services.
Since symfony/dependency-injection 6.4.12 the Container::reset() method empties services AFTER calling "reset()" method on each service.
As ResetContainerMigration is itself a service, symfony calls reset() also on ResetContainerMigration service instance and starts an infinite loop.
This ends with an complete memory consumption on my dev environment and out of mem in remote environments.
Expected Result
The loop is avoided and MigrationContainer does not causes infinite loop on reset();
Summary
MigrationContainer should not assume that symfony container services have been emptied.
A recent update of symfony/dependency-injection > Container::reset() method makes migrations run into an infinite reset loop.
see :
Steps to reproduce
Installation runs into an infinite loop on first call to a migration implementing ResetContainerMigration (see ResetContainerMigrationListener::onPostUp()) : first migration called is UpdateEntityConfigMigration.
Actual Result
On instance of ResetContainerMigration call, ResetContainerMigrationListener calls $this->container->reset();
$this->container is the symfony container that iterates on every existing service that implements ResetInterface and call $service->reset(); on it.
Before symfony/dependency-injection 6.4.12 the Container::reset() method emptied services BEFORE calling "reset()" method on each services.
Since symfony/dependency-injection 6.4.12 the Container::reset() method empties services AFTER calling "reset()" method on each service.
As ResetContainerMigration is itself a service, symfony calls reset() also on ResetContainerMigration service instance and starts an infinite loop.
This ends with an complete memory consumption on my dev environment and out of mem in remote environments.
Expected Result
The loop is avoided and MigrationContainer does not causes infinite loop on reset();
Details about your environment
Additional information
Previous symfony reset() method :
6.4.12 symfony reset() method :
The text was updated successfully, but these errors were encountered: