瀏覽代碼

Refactor the installation chapter

Baptiste "Talus" Clavie 13 年之前
父節點
當前提交
7c9260caa3
共有 1 個文件被更改,包括 25 次插入47 次删除
  1. 25 47
      Resources/doc/reference/installation.rst

+ 25 - 47
Resources/doc/reference/installation.rst

@@ -1,10 +1,26 @@
 Installation
 ============
-
 Prerequisites
 -------------
+PHP 5.3 and Symfony 2 are needed to make this bundle work ; there are also some
+Sonata dependencies that need to be installed and configured beforehand :
+
+    - `SonataCacheBundle <http://sonata-project.org/bundles/cache>`_
+    - `SonataBlockBundle <http://sonata-project.org/bundles/block>`_
+    - `SonatajQueryBundle <https://github.com/sonata-project/SonatajQueryBundle>`_
+    - `KnpMenuBundle <https://github.com/KnpLabs/KnpMenuBundle/blob/master/Resources/doc>`_
+    - `Exporter <https://github.com/sonata-project/exporter>`_
+
+You will need to install those in their 2.0 branches (or master if they don't
+have a similar branch). Follow also their configuration step ; you will find
+everything you need in their installation chapter.
 
-**Translations.**
+.. note::
+    If a dependency is already installed somewhere in your project or in
+    another dependency, you won't need to install it again.
+
+Translations
+~~~~~~~~~~~~
 If you wish to use default translation texts provided in this bundle, you have
 to make sure you have translator enabled in your config.
 
@@ -17,45 +33,14 @@ to make sure you have translator enabled in your config.
 
 Installation
 ------------
-
-Download SonataAdminBundle and its dependencies to the ``vendor`` directory. You
-can use the Symfony's vendor script for the automated procces. Add the following
-in your ``deps`` file:
+Alter your deps file, and add these lines :
 
 .. code-block:: ini
 
-  [SonataAdminBundle]
-      git=git://github.com/sonata-project/SonataAdminBundle.git
-      target=/bundles/Sonata/AdminBundle
-      version=origin/2.0
-
-  [SonataBlockBundle]
-      git=git://github.com/sonata-project/SonataBlockBundle.git
-      target=/bundles/Sonata/BlockBundle
-      version=origin/2.0
-
-  [SonataCacheBundle]
-      git=git://github.com/sonata-project/SonataCacheBundle.git
-      target=/bundles/Sonata/CacheBundle
-      version=origin/2.0
-
-  [SonatajQueryBundle]
-      git=http://github.com/sonata-project/SonatajQueryBundle.git
-      target=/bundles/Sonata/jQueryBundle
-
-  [KnpMenuBundle]
-      git=http://github.com/KnpLabs/KnpMenuBundle.git
-      target=/bundles/Knp/Bundle/MenuBundle
-      version=v1.1.0
-
-  [KnpMenu]
-      git=http://github.com/KnpLabs/KnpMenu.git
-      target=/knp/menu
-      version=v1.1.1
-
-  [Exporter]
-      git=http://github.com/sonata-project/exporter.git
-      target=/exporter
+    [SonataAdminBundle]
+        git=git://github.com/sonata-project/SonataAdminBundle.git
+        target=/bundles/Sonata/AdminBundle
+        version=origin/2.0
 
 You will also need to alter your ``app/config/config.yml`` file :
 
@@ -76,8 +61,8 @@ and finally run the vendors script to download bundles::
 
   php bin/vendors install
 
-Next, be sure to enable this bundles in your autoload.php and AppKernel.php
-files:
+Next, be sure to enable this bundle in your autoload.php (if it is not already
+in there) and AppKernel.php files:
 
 .. code-block:: php
 
@@ -86,9 +71,6 @@ files:
     $loader->registerNamespaces(array(
         // ...
         'Sonata'     => __DIR__.'/../vendor/bundles',
-        'Exporter'   => __DIR__.'/../vendor/exporter/lib',
-        'Knp\Bundle' => __DIR__.'/../vendor/bundles',
-        'Knp\Menu'   => __DIR__.'/../vendor/knp/menu/src',
         // ...
     ));
 
@@ -98,10 +80,6 @@ files:
         return array(
             // ...
             new Sonata\AdminBundle\SonataAdminBundle(),
-            new Sonata\BlockBundle\SonataBlockBundle(),
-            new Sonata\CacheBundle\SonataCacheBundle(),
-            new Sonata\jQueryBundle\SonatajQueryBundle(),
-            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
             // ...
         );
     }