@@ -64,7 +64,8 @@ public function process(ContainerBuilder $container)
6464 $ this ->lazy = false ;
6565
6666 foreach ($ container ->getAliases () as $ id => $ alias ) {
67- $ this ->graph ->connect ($ id , $ alias , (string ) $ alias , $ this ->getDefinition ((string ) $ alias ), null );
67+ $ targetId = $ this ->getDefinitionId ((string ) $ alias );
68+ $ this ->graph ->connect ($ id , $ alias , $ targetId , $ this ->getDefinition ($ targetId ), null );
6869 }
6970
7071 parent ::process ($ container );
@@ -87,12 +88,13 @@ protected function processValue($value, $isRoot = false)
8788 return $ value ;
8889 }
8990 if ($ value instanceof Reference) {
90- $ targetDefinition = $ this ->getDefinition ((string ) $ value );
91+ $ targetId = $ this ->getDefinitionId ((string ) $ value );
92+ $ targetDefinition = $ this ->getDefinition ($ targetId );
9193
9294 $ this ->graph ->connect (
9395 $ this ->currentId ,
9496 $ this ->currentDefinition ,
95- $ this -> getDefinitionId (( string ) $ value ) ,
97+ $ targetId ,
9698 $ targetDefinition ,
9799 $ value ,
98100 $ this ->lazy || ($ targetDefinition && $ targetDefinition ->isLazy ()),
@@ -125,10 +127,8 @@ protected function processValue($value, $isRoot = false)
125127 return $ value ;
126128 }
127129
128- private function getDefinition (string $ id ): ?Definition
130+ private function getDefinition (? string $ id ): ?Definition
129131 {
130- $ id = $ this ->getDefinitionId ($ id );
131-
132132 return null === $ id ? null : $ this ->container ->getDefinition ($ id );
133133 }
134134
@@ -156,11 +156,12 @@ private function getExpressionLanguage()
156156 $ this ->expressionLanguage = new ExpressionLanguage (null , $ providers , function ($ arg ) {
157157 if ('"" ' === substr_replace ($ arg , '' , 1 , -1 )) {
158158 $ id = stripcslashes (substr ($ arg , 1 , -1 ));
159+ $ id = $ this ->getDefinitionId ($ id );
159160
160161 $ this ->graph ->connect (
161162 $ this ->currentId ,
162163 $ this ->currentDefinition ,
163- $ this -> getDefinitionId ( $ id ) ,
164+ $ id ,
164165 $ this ->getDefinition ($ id )
165166 );
166167 }
0 commit comments