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
During running the diff command I get the error: The entity manager is not available. even though I configured the em setting and the entity manager exists.
Current behavior
I've configured the entity manager setting, but when building the container the bundle's extension does not get access to the entire container. As such it cannot find the entity manager service that is configured or the default one. It then defaults to using the Doctrine default connection. The problem shows up in doctrine/migrations/lib/Doctrine/Migrations/DependencyFactory.php:224 when trying to create the OrmSchemaProvider. Since the DependencyFactory was built using fromConnection() the entity manager is null.
How to reproduce
configuration:
// config/doctrine_migrations.yaml
doctrine_migrations:
em: default // or any other entity manager
clear cache to rebuild the container
run bin/console doctrine:migrations:diff
Expected behavior
The command would execute using the configured entity manager.
The text was updated successfully, but these errors were encountered:
Bug Report
Summary
Symfony 5.0.4
Doctrine Migrations: 3.0-dev
Doctrine Migrations Bundle:3.0-dev
During running the diff command I get the error:
The entity manager is not available.
even though I configured theem
setting and the entity manager exists.Current behavior
I've configured the entity manager setting, but when building the container the bundle's extension does not get access to the entire container. As such it cannot find the entity manager service that is configured or the default one. It then defaults to using the Doctrine default connection. The problem shows up in doctrine/migrations/lib/Doctrine/Migrations/DependencyFactory.php:224 when trying to create the OrmSchemaProvider. Since the DependencyFactory was built using fromConnection() the entity manager is null.
How to reproduce
// config/doctrine_migrations.yaml
Expected behavior
The command would execute using the configured entity manager.
The text was updated successfully, but these errors were encountered: