1
1
<?php
2
2
/**
3
- * Copyright © Magento, Inc. All rights reserved.
4
- * See COPYING.txt for license details .
3
+ * Copyright 2015 Adobe
4
+ * All Rights Reserved .
5
5
*/
6
+
6
7
namespace Magento \Setup \Console \Command ;
7
8
8
9
use Magento \Framework \App \ObjectManager ;
30
31
*/
31
32
class DiCompileCommand extends Command
32
33
{
33
- /** Command name */
34
- const NAME = 'setup:di:compile ' ;
34
+ public const NAME = 'setup:di:compile ' ;
35
35
36
36
/**
37
37
* @var \Magento\Framework\App\DeploymentConfig
@@ -79,8 +79,6 @@ class DiCompileCommand extends Command
79
79
private $ file ;
80
80
81
81
/**
82
- * Constructor
83
- *
84
82
* @param DeploymentConfig $deploymentConfig
85
83
* @param DirectoryList $directoryList
86
84
* @param Manager $taskManager
@@ -89,6 +87,7 @@ class DiCompileCommand extends Command
89
87
* @param DriverInterface $fileDriver
90
88
* @param \Magento\Framework\Component\ComponentRegistrar $componentRegistrar
91
89
* @param File|null $file
90
+ *
92
91
* @throws \Magento\Setup\Exception
93
92
*/
94
93
public function __construct (
@@ -151,6 +150,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
151
150
foreach ($ errors as $ line ) {
152
151
$ output ->writeln ($ line );
153
152
}
153
+
154
154
// we must have an exit code higher than zero to indicate something was wrong
155
155
return Cli::RETURN_FAILURE ;
156
156
}
@@ -224,13 +224,15 @@ function (OperationInterface $operation) use ($progressBar) {
224
224
// we must have an exit code higher than zero to indicate something was wrong
225
225
return Cli::RETURN_FAILURE ;
226
226
}
227
+
227
228
return Cli::RETURN_SUCCESS ;
228
229
}
229
230
230
231
/**
231
232
* Build list of module path regexps which should be excluded from compilation
232
233
*
233
234
* @param string[] $modulePaths
235
+ *
234
236
* @return string[]
235
237
*/
236
238
private function getExcludedModulePaths (array $ modulePaths )
@@ -251,6 +253,7 @@ private function getExcludedModulePaths(array $modulePaths)
251
253
$ vendorPathsRegExps [] = $ vendorDir
252
254
. '/(?: ' . join ('| ' , $ vendorModules ) . ') ' ;
253
255
}
256
+
254
257
$ basePathsRegExps [] = preg_quote ($ basePath , '# ' )
255
258
. '/(?: ' . join ('| ' , $ vendorPathsRegExps ) . ') ' ;
256
259
}
@@ -266,6 +269,7 @@ private function getExcludedModulePaths(array $modulePaths)
266
269
* Build list of library path regexps which should be excluded from compilation
267
270
*
268
271
* @param string[] $libraryPaths
272
+ *
269
273
* @return string[]
270
274
*/
271
275
private function getExcludedLibraryPaths (array $ libraryPaths )
@@ -288,6 +292,7 @@ function ($libraryPath) {
288
292
* Get excluded setup application paths
289
293
*
290
294
* @param string $setupPath
295
+ *
291
296
* @return string[]
292
297
*/
293
298
private function getExcludedSetupPaths ($ setupPath )
@@ -301,6 +306,7 @@ private function getExcludedSetupPaths($setupPath)
301
306
* Delete directories by their code from "var" directory
302
307
*
303
308
* @param array $directoryCodeList
309
+ *
304
310
* @return void
305
311
*/
306
312
private function cleanupFilesystem ($ directoryCodeList )
@@ -314,6 +320,7 @@ private function cleanupFilesystem($directoryCodeList)
314
320
* Configure Object Manager
315
321
*
316
322
* @param OutputInterface $output
323
+ *
317
324
* @return void
318
325
*/
319
326
private function configureObjectManager (OutputInterface $ output )
@@ -365,6 +372,7 @@ private function configureObjectManager(OutputInterface $output)
365
372
* Returns operations configuration
366
373
*
367
374
* @param array $compiledPathsList
375
+ *
368
376
* @return array
369
377
*/
370
378
private function getOperationsConfiguration (
@@ -399,6 +407,7 @@ private function getOperationsConfiguration(
399
407
OperationFactory::AREA_CONFIG_GENERATOR => [
400
408
$ compiledPathsList ['application ' ],
401
409
$ compiledPathsList ['library ' ],
410
+ $ compiledPathsList ['setup ' ],
402
411
$ compiledPathsList ['generated_helpers ' ],
403
412
],
404
413
OperationFactory::INTERCEPTION_CACHE => [
0 commit comments