Skip to content

Commit 94817b3

Browse files
committed
MAGETWO-33080: Preferences, Shared Instance creation and Compiled Factory optimization
- changed arguments postprocessing order - getInstanceType will be removed
1 parent 33ebc24 commit 94817b3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

dev/tools/Magento/Tools/Di/App/Compiler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public function launch()
6666
'Magento\Tools\Di\Compiler\Config\Chain\ModificationChain' => [
6767
'arguments' => [
6868
'modificationsList' => [
69-
'ArgumentsSerialization' =>
70-
['instance' => 'Magento\Tools\Di\Compiler\Config\Chain\ArgumentsSerialization'],
7169
'PreferencesResolving' =>
7270
['instance' => 'Magento\Tools\Di\Compiler\Config\Chain\PreferencesResolving'],
71+
'ArgumentsSerialization' =>
72+
['instance' => 'Magento\Tools\Di\Compiler\Config\Chain\ArgumentsSerialization'],
7373
]
7474
]
7575
]

lib/internal/Magento/Framework/ObjectManager/Factory/Compiled.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public function create($type, array $arguments = [])
5555
{
5656
/** @TODO get rid of ltrim() usage and place it to client code */
5757
$args = $this->config->getArguments($type);
58+
$type = $this->config->getInstanceType($type);
5859
if ($args === null) {
5960
return new $type();
6061
}

0 commit comments

Comments
 (0)