In the context of Symfony2 and in accordance with the source code of Doctrine and Symfony Doctrine Bridge, you will need to enter a service called doctrine that takes connection , entity manager , default connection and default entity manager as arguments. This service is defined in vendor\{...}\Doctrine\Bundle\DoctrineBundle\Resources\config\dbal.xml .
(This service is an instance of Doctrine\Bundle\DoctrineBundle\Registry that extends the Abstract class Symfony\Bridge\Doctrine\ManagerRegistry , which extends Doctrine\Common\Persistence\AbstractManagerRegistry , which finally implements the Doctrine\Common\Persistence\ManagerRegistry , which is a type of intended class.)
As mentioned in the first few lines of the Silex vendor documentation according to Doctrine , the ORM service is not provided. Since you are using a custom provider to use ORM, you need to enter the equivalent of this doctrine service.
source share