Skip to content

Commit 087e329

Browse files
author
Joan He
committed
MAGETWO-41954: Eliminate code generatio in production mode
1 parent d5b09f9 commit 087e329

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

setup/src/Magento/Setup/Console/Command/DiCompileCommand.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,16 +293,21 @@ private function getOperationsConfiguration(
293293
array $compiledPathsList,
294294
array $dataAttributesIncludePattern
295295
) {
296+
$excludePatterns = [];
297+
foreach ($this->excludedPathsList as $excludedPaths) {
298+
$excludePatterns = array_merge($excludedPaths, $excludePatterns);
299+
}
300+
296301
$operations = [
297302
OperationFactory::PROXY_GENERATOR => [
298303
'paths' => $compiledPathsList['application'],
299304
'filePatterns' => ['di' => '/\/etc\/([a-zA-Z_]*\/di|di)\.xml$/'],
300-
'excludePatterns' => ['/\/Test\//']
305+
'excludePatterns' => $excludePatterns,
301306
],
302307
OperationFactory::REPOSITORY_GENERATOR => [
303308
'paths' => $compiledPathsList['application'],
304309
'filePatterns' => ['di' => '/\/etc\/([a-zA-Z_]*\/di|di)\.xml$/'],
305-
'excludePatterns' => ['/\/Test\//']
310+
'excludePatterns' => $excludePatterns,
306311
],
307312
OperationFactory::DATA_ATTRIBUTES_GENERATOR => [
308313
'paths' => $compiledPathsList['application'],
@@ -315,7 +320,7 @@ private function getOperationsConfiguration(
315320
$compiledPathsList['generated_helpers'],
316321
],
317322
'filePatterns' => ['php' => '/\.php$/'],
318-
'excludePatterns' => ['/\/Test\//']
323+
'excludePatterns' => $excludePatterns,
319324
],
320325
OperationFactory::INTERCEPTION => [
321326
'intercepted_paths' => [

0 commit comments

Comments
 (0)