File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -664,14 +664,14 @@ private function formatArgument(\DOMElement $argument): string
664664
665665 $ itemKey = $ item ->getAttribute ('key ' ) ?: $ item ->getAttribute ('name ' );
666666
667- $ itemKey = match ($ item ->getAttribute ('key-type ' )) {
667+ $ itemKeyFormatted = match ($ item ->getAttribute ('key-type ' )) {
668668 'constant ' => '\\' .ltrim ($ itemKey , '\\' ),
669669 'binary ' => 'base64_decode( ' .$ this ->formatString ($ itemKey ).') ' ,
670670 default => $ this ->formatString ($ itemKey ),
671671 };
672672
673673 if ($ itemKey ) {
674- $ items [] = $ itemKey . ' => ' . $ this ->formatArgument ($ item );
674+ $ items [] = $ itemKeyFormatted . ' => ' . $ this ->formatArgument ($ item );
675675 } else {
676676 $ items [] = $ this ->formatArgument ($ item );
677677 }
Original file line number Diff line number Diff line change 8181 <argument index =" 1" >second argument</argument >
8282 </service >
8383
84+ <!-- Service with arguments without explicit index -->
85+ <service id =" app.indexed_service_no_key" class =" App\Service\IndexedService" >
86+ <argument >first argument</argument >
87+ <argument >second argument</argument >
88+ <argument >third argument</argument >
89+ </service >
90+
8491 <!-- Service with property injection -->
8592 <service id =" app.newsletter_manager" class =" App\Service\NewsletterManager" >
8693 <property name =" mailer" type =" service" id =" app.mailer" />
You can’t perform that action at this time.
0 commit comments