File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
setup/src/Magento/Setup/Module/Di/Compiler/Config Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -118,11 +118,16 @@ public function generateCachePerScope(
118
118
}
119
119
120
120
if (!$ definitionsCollection ->hasInstance ($ preference )) {
121
- // Removing this preference, because its class has been excluded intentionally.
122
121
// See 'excludePatterns' in Magento\Setup\Module\Di\Code\Reader\ClassesScanner,
123
122
// populated via Magento\Setup\Console\Command\DiCompileCommand
124
- // TODO: add logging here so developers get useful messaging.
125
- continue ;
123
+ throw new LocalizedException (new Phrase (
124
+ 'Preference declared for "%instanceName" as "%preference", but the latter '
125
+ . ' has not been included in dependency injection compilation. ' ,
126
+ [
127
+ 'instanceName ' => $ instanceName ,
128
+ 'preference ' => $ preference ,
129
+ ]
130
+ ));
126
131
}
127
132
128
133
$ config ['preferences ' ][$ instanceName ] = $ preference ;
You can’t perform that action at this time.
0 commit comments