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