* added a RegistryInterface * changed all classes to depend on the Registry instead of a specific EntityManager This is more consistent as the validator already took the registry and this allows to use any entity manager in Forms.
The Registry knows all connections and entity managers declared into a service container. The Registry is available via the 'doctrine' service. If can be used to get connections and entity managers by name: Before: $em = $this->get('doctrine.orm.entity_manager'); $em = $this->get('doctrine.orm.foobar_entity_manager'); After: $em = $this->get('doctrine')->getEntityManager(); $em = $this->get('doctrine')->getEntityManager('foobar'); It is better for several reasons: * we rely less on naming conventions * IDEs will be able to auto-complete methods
…ed and will be re-added in the upcoming WebProfilerBundle)