The doctrine:generate:entities is now able to generate classes
based on a bundle name, a class name, or a namespace.
The command has still some limitations which will be hopefully
be fixed later on.
If also generates the repository class when possible
(replaces the doctrine:generate:repositories command).
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
* Doctrine event subscribers now all use the same "doctrine.event_subscriber" tag. To specify a connection,
use the "connection" attribute.
* Doctrine event listeners now all use the same "doctrine.event_listener" tag. To specify a connection,
use the "connection" attribute.
This has been removed for several reasons:
* the framework does not know where the document root is and should not care
* as the document root was static, it was impossible to have several document roots depending on some business rules (see next one)
* sometimes, the document root is not under the web root directory (so the logic of getWebPath() is not always correct)
* the feature was not used anywhere in the core
* schmittjoh/referenceValidation:
[DependencyInjection] also check references of inlined services
[DependencyInjection] adds emulation of "exception-on-invalid-reference" behavior