13
13
use Drupal \Console \Core \Bootstrap \DrupalConsoleCore ;
14
14
use Drupal \Console \Core \Utils \DrupalFinder ;
15
15
use Drupal \Console \Core \Bootstrap \DrupalInterface ;
16
+ use Drupal \Console \Core \Utils \ConfigurationManager ;
16
17
17
18
class Drupal implements DrupalInterface
18
19
{
@@ -23,16 +24,26 @@ class Drupal implements DrupalInterface
23
24
*/
24
25
protected $ drupalFinder ;
25
26
27
+ /**
28
+ * @var ConfigurationManager
29
+ */
30
+ protected $ configurationManager ;
31
+
26
32
/**
27
33
* Drupal constructor.
28
34
*
29
35
* @param $autoload
30
36
* @param $drupalFinder
37
+ * @param $configurationManager
31
38
*/
32
- public function __construct ($ autoload , DrupalFinder $ drupalFinder )
33
- {
39
+ public function __construct (
40
+ $ autoload ,
41
+ DrupalFinder $ drupalFinder ,
42
+ ConfigurationManager $ configurationManager
43
+ ) {
34
44
$ this ->autoload = $ autoload ;
35
45
$ this ->drupalFinder = $ drupalFinder ;
46
+ $ this ->configurationManager = $ configurationManager ;
36
47
}
37
48
38
49
/**
@@ -177,13 +188,12 @@ public function boot()
177
188
178
189
AnnotationRegistry::registerLoader ([$ this ->autoload , "loadClass " ]);
179
190
180
- // Load configuration from directory
181
- $ container -> get ( 'console.configuration_manager ' )
182
- -> loadConfiguration ( $ this ->drupalFinder -> getComposerRoot ())
183
- -> getConfiguration ( );
191
+ $ container -> set (
192
+ 'console.configuration_manager ' ,
193
+ $ this ->configurationManager
194
+ );
184
195
185
- $ configuration = $ container ->get ('console.configuration_manager ' )
186
- ->getConfiguration ();
196
+ $ configuration = $ this ->configurationManager ->getConfiguration ();
187
197
188
198
$ container ->get ('console.translator_manager ' )
189
199
->loadCoreLanguage (
0 commit comments