Documentation » Doctrine2 ORM Admin

2. Configuration »

« Doctrine ORM Admin Bundle

1. Installation

SonataDoctrineORMAdminBundle is part of a set of bundles aimed at abstracting storage connectivity for SonataAdminBundle. As such, SonataDoctrineORMAdminBundle depends on SonataAdminBundle and will not work without it.


These installation instructions are meant to be used only as part of SonataAdminBundle’s installation process, which is documented here.

1.1. Download the bundle

Use Composer:

composer require sonata-project/doctrine-orm-admin-bundle

You’ll be asked to type in a version constraint. dev-master will usually get you the latest, bleeding edge version. Check packagist for stable and legacy versions:


Please provide a version constraint for the sonata-project/doctrine-orm-admin-bundle requirement: dev-master

1.2. Enable the bundle

Next, be sure to enable the bundles in your bundles.php file if they are not already enabled:


// config/bundles.php

return [
    Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle::class => ['all' => true],


If you are not using Symfony Flex, you should enable bundles in your AppKernel.php.


// app/AppKernel.php

public function registerBundles()
    return array(
        // ...
        // set up basic sonata requirements
        // ...
        new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
        // ...


Don’t forget that, as part of SonataAdminBundle’s installation instructions, you need to enable additional bundles on AppKernel.php.

Found a typo? Something is wrong in this documentation? Just fork and edit it!