浏览代码

Remove core-bundle presence check (#3930)

The bundle is required on the composer.json file.

Check it manually makes no sense.
Sullivan SENECHAL 9 年之前
父节点
当前提交
a43725d9bf
共有 1 个文件被更改,包括 0 次插入10 次删除
  1. 0 10
      DependencyInjection/SonataAdminExtension.php

+ 0 - 10
DependencyInjection/SonataAdminExtension.php

@@ -29,21 +29,11 @@ class SonataAdminExtension extends Extension implements PrependExtensionInterfac
     /**
      * @param array            $configs   An array of configuration settings
      * @param ContainerBuilder $container A ContainerBuilder instance
-     *
-     * @throws \RuntimeException
      */
     public function load(array $configs, ContainerBuilder $container)
     {
         $bundles = $container->getParameter('kernel.bundles');
 
-        if (!isset($bundles['SonataCoreBundle'])) {
-            throw new \RuntimeException(<<<'BOOM'
-Boom! you are living on the edge ;) The AdminBundle requires the CoreBundle!
-Please add ``"sonata-project/core-bundle": "~2.2"`` into your composer.json file and add the SonataCoreBundle into the AppKernel');
-BOOM
-            );
-        }
-
         if (isset($bundles['SonataUserBundle'])) {
             // integrate the SonataUserBundle / FOSUserBundle if the bundle exists
             array_unshift($configs, array(