Installation ============ SonataAdminBundle can be installed at any moment during a project's lifecycle, whether it's a clean Symfony2 installation or an existing project. Downloading the code -------------------- Use composer to manage your dependencies and download SonataAdminBundle: .. code-block:: bash php composer.phar require sonata-project/admin-bundle You'll be asked to type in a version constraint. 'dev-master' will get you the latest version, compatible with the latest Symfony2 version. Check `packagist `_ for older versions: .. code-block:: bash Please provide a version constraint for the sonata-project/admin-bundle requirement: dev-master Selecting and downloading a storage bundle ------------------------------------------ SonataAdminBundle is storage agnostic, meaning it can work with several storage mechanism. Depending on which you are using on your project, you'll need to install one of the following bundles. In the respective links you'll find simple installation instructions for each of them: - `SonataDoctrineORMAdminBundle `_ - `SonataDoctrineMongoDBAdminBundle `_ - `SonataPropelAdminBundle `_ - `SonataDoctrinePhpcrAdminBundle `_ .. note:: Don't know which to choose? Most new users prefer SonataDoctrineORMAdmin, to interact with traditional relational databases (MySQL, PostgreSQL, etc) Enabling SonataAdminBundle and its dependencies ----------------------------------------------- SonataAdminBundle relies on other bundles to implement some features. Besides the storage layer mentioned on step 2, there are other bundles needed for SonataAdminBundle to work: - `SonataBlockBundle `_ - `SonatajQueryBundle `_ - `KnpMenuBundle `_ (Version 1.1.*) These bundles are automatically downloaded by composer as a dependency of SonataAdminBundle. However, you have to enable them in your AppKernel.php, and configure them manually. Don't forget to enable SonataAdminBundle too: .. code-block:: php `_, `Sonata Users Group `_, `Symfony2 Users Group `_ and `Symfony Forum `_ to see if you can find a solution. - Still no luck? Try checking the project's open issues on GitHub. After you have successfully installed the above bundles you need to configure SonataAdminBundle for administering your models. All that is needed to quickly set up SonataAdminBundle is described in the :doc:`getting_started` chapter.