@@ -220,7 +220,7 @@ private function parseImports(array $content, string $file)
220220 }
221221 }
222222
223- private function parseDefinitions (array $ content , string $ file )
223+ private function parseDefinitions (array $ content , string $ file, bool $ trackBindings = true )
224224 {
225225 if (!isset ($ content ['services ' ])) {
226226 return ;
@@ -253,7 +253,7 @@ private function parseDefinitions(array $content, string $file)
253253 $ this ->isLoadingInstanceof = false ;
254254 $ defaults = $ this ->parseDefaults ($ content , $ file );
255255 foreach ($ content ['services ' ] as $ id => $ service ) {
256- $ this ->parseDefinition ($ id , $ service , $ file , $ defaults );
256+ $ this ->parseDefinition ($ id , $ service , $ file , $ defaults, false , $ trackBindings );
257257 }
258258 }
259259
@@ -342,7 +342,7 @@ private function isUsingShortSyntax(array $service): bool
342342 *
343343 * @throws InvalidArgumentException When tags are invalid
344344 */
345- private function parseDefinition (string $ id , $ service , string $ file , array $ defaults , bool $ return = false )
345+ private function parseDefinition (string $ id , $ service , string $ file , array $ defaults , bool $ return = false , bool $ trackBindings = true )
346346 {
347347 if (preg_match ('/^_[a-zA-Z0-9_]*$/ ' , $ id )) {
348348 throw new InvalidArgumentException (sprintf ('Service names that start with an underscore are reserved. Rename the "%s" service or define it in XML instead. ' , $ id ));
@@ -666,7 +666,7 @@ private function parseDefinition(string $id, $service, string $file, array $defa
666666 $ bindingType = $ this ->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING ;
667667 foreach ($ bindings as $ argument => $ value ) {
668668 if (!$ value instanceof BoundArgument) {
669- $ bindings [$ argument ] = new BoundArgument ($ value , true , $ bindingType , $ file );
669+ $ bindings [$ argument ] = new BoundArgument ($ value , $ trackBindings , $ bindingType , $ file );
670670 }
671671 }
672672 }
0 commit comments