composer require sergiors/doctrine-orm-service-provider "dev-master"
Something like this
use Silex\Provider\DoctrineServiceProvider;
use Sergiors\Pimple\Provider\DoctrineOrmServiceProvider;
use Sergiors\Pimple\Provider\DoctrineCacheServiceProvider;
$app->register(new DoctrineServiceProvider(), [
// your db config
]);
$app->register(new DoctrineCacheServiceProvider());
$app->register(new DoctrineOrmServiceProvider(), [
'orm.proxy_dir' => '',
'orm.proxy_namespace' => ''
]);
$app['orm']->getRepository('Namespace\Entity\User')->findAll();
MIT