@@ -220,7 +220,7 @@ private function parseImports(array $content, string $file)
220
220
}
221
221
}
222
222
223
- private function parseDefinitions (array $ content , string $ file )
223
+ private function parseDefinitions (array $ content , string $ file, bool $ trackBindings = true )
224
224
{
225
225
if (!isset ($ content ['services ' ])) {
226
226
return ;
@@ -253,7 +253,7 @@ private function parseDefinitions(array $content, string $file)
253
253
$ this ->isLoadingInstanceof = false ;
254
254
$ defaults = $ this ->parseDefaults ($ content , $ file );
255
255
foreach ($ content ['services ' ] as $ id => $ service ) {
256
- $ this ->parseDefinition ($ id , $ service , $ file , $ defaults );
256
+ $ this ->parseDefinition ($ id , $ service , $ file , $ defaults, false , $ trackBindings );
257
257
}
258
258
}
259
259
@@ -342,7 +342,7 @@ private function isUsingShortSyntax(array $service): bool
342
342
*
343
343
* @throws InvalidArgumentException When tags are invalid
344
344
*/
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 )
346
346
{
347
347
if (preg_match ('/^_[a-zA-Z0-9_]*$/ ' , $ id )) {
348
348
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
666
666
$ bindingType = $ this ->isLoadingInstanceof ? BoundArgument::INSTANCEOF_BINDING : BoundArgument::SERVICE_BINDING ;
667
667
foreach ($ bindings as $ argument => $ value ) {
668
668
if (!$ value instanceof BoundArgument) {
669
- $ bindings [$ argument ] = new BoundArgument ($ value , true , $ bindingType , $ file );
669
+ $ bindings [$ argument ] = new BoundArgument ($ value , $ trackBindings , $ bindingType , $ file );
670
670
}
671
671
}
672
672
}
0 commit comments