Yaffs site version 1.1
[yaffs-website] / vendor / drupal / console-core / src / Bootstrap / DrupalConsoleCore.php
index d35c262e7909e36b59e3a6266a62140ce8ff3eae..16ad4f1d5c8ee635d8937424a7a9b3f422d55f2b 100644 (file)
@@ -13,6 +13,7 @@ use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
 
 /**
  * Class DrupalConsoleCore
+ *
  * @package Drupal\Console\Core\Bootstrap
  */
 class DrupalConsoleCore
@@ -29,6 +30,7 @@ class DrupalConsoleCore
 
     /**
      * DrupalConsole constructor.
+     *
      * @param $root
      * @param $appRoot
      */
@@ -45,15 +47,18 @@ class DrupalConsoleCore
     {
         $container = new ContainerBuilder();
         $loader = new YamlFileLoader($container, new FileLocator($this->root));
-        $loader->load($this->root.DRUPAL_CONSOLE_CORE.'/services.yml');
-        if (file_exists($this->root.'/services.yml')) {
-            $loader->load('services.yml');
-        }
 
-        if (file_exists($this->root.DRUPAL_CONSOLE.'/services-drupal-install.yml')) {
-            $loader->load(
-                $this->root . DRUPAL_CONSOLE . '/services-drupal-install.yml'
-            );
+        $servicesFiles = [
+            $this->root.DRUPAL_CONSOLE_CORE.'/services.yml',
+            $this->root.'/services.yml',
+            $this->root.DRUPAL_CONSOLE.'/uninstall.services.yml',
+            $this->root.DRUPAL_CONSOLE.'/extend.console.uninstall.services.yml'
+        ];
+
+        foreach ($servicesFiles as $servicesFile) {
+            if (file_exists($servicesFile)) {
+                $loader->load($servicesFile);
+            }
         }
 
         $container->get('console.configuration_manager')
@@ -82,7 +87,7 @@ class DrupalConsoleCore
         $autoloadFile = $directory . 'vendor/autoload.php';
         if (is_file($autoloadFile)) {
             include_once $autoloadFile;
-            $extendServicesFile = $directory . 'extend.console.services.yml';
+            $extendServicesFile = $directory . 'extend.console.uninstall.services.yml';
             if (is_file($extendServicesFile)) {
                 $loader->load($extendServicesFile);
             }