File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -555,13 +555,9 @@ public static function autowireArguments(
555
555
$ optCount = 0 ;
556
556
break ;
557
557
558
- } elseif (array_key_exists ($ paramName , $ arguments )) {
559
- $ res [$ useName ? $ paramName : $ num ] = $ arguments [$ paramName ];
560
- unset($ arguments [$ paramName ], $ arguments [$ num ]);
561
-
562
- } elseif (array_key_exists ($ num , $ arguments )) {
563
- $ res [$ useName ? $ paramName : $ num ] = $ arguments [$ num ];
564
- unset($ arguments [$ num ]);
558
+ } elseif (array_key_exists ($ key = $ paramName , $ arguments ) || array_key_exists ($ key = $ num , $ arguments )) {
559
+ $ res [$ useName ? $ paramName : $ num ] = $ arguments [$ key ];
560
+ unset($ arguments [$ key ], $ arguments [$ num ]); // unset $num to enable overwriting in configuration
565
561
566
562
} elseif (($ aw = self ::autowireArgument ($ param , $ getter )) !== null ) {
567
563
$ res [$ useName ? $ paramName : $ num ] = $ aw ;
You can’t perform that action at this time.
0 commit comments