Symfony: Inject Repository rather than Entity Manager

Here’s a great blog post detailing how and why you should use repositories rather directly working with entities.

http://php-and-symfony.matthiasnoback.nl/2014/05/inject-a-repository-instead-of-an-entity-manager

Share Button