@@ -50,18 +50,18 @@ public function dump(array $options = []): string
50
50
51
51
$ this ->dumper ??= new YmlDumper ();
52
52
53
- return $ this ->container -> resolveEnvPlaceholders ( $ this -> addParameters ()."\n" .$ this ->addServices () );
53
+ return $ this ->addParameters ()."\n" .$ this ->addServices ();
54
54
}
55
55
56
56
private function addService (string $ id , Definition $ definition ): string
57
57
{
58
- $ code = " $ id : \n" ;
58
+ $ code = " { $ this -> dumper -> dump ( $ id )} : \n" ;
59
59
if ($ class = $ definition ->getClass ()) {
60
60
if (str_starts_with ($ class , '\\' )) {
61
61
$ class = substr ($ class , 1 );
62
62
}
63
63
64
- $ code .= sprintf (" class: %s \n" , $ this ->dumper ->dump ($ class ));
64
+ $ code .= sprintf (" class: %s \n" , $ this ->dumper ->dump ($ this -> container -> resolveEnvPlaceholders ( $ class) ));
65
65
}
66
66
67
67
if (!$ definition ->isPrivate ()) {
@@ -87,7 +87,7 @@ private function addService(string $id, Definition $definition): string
87
87
}
88
88
89
89
if ($ definition ->getFile ()) {
90
- $ code .= sprintf (" file: %s \n" , $ this ->dumper ->dump ($ definition ->getFile ()));
90
+ $ code .= sprintf (" file: %s \n" , $ this ->dumper ->dump ($ this -> container -> resolveEnvPlaceholders ( $ definition ->getFile () )));
91
91
}
92
92
93
93
if ($ definition ->isSynthetic ()) {
@@ -238,7 +238,7 @@ private function dumpCallable(mixed $callable): mixed
238
238
}
239
239
}
240
240
241
- return $ callable ;
241
+ return $ this -> container -> resolveEnvPlaceholders ( $ callable) ;
242
242
}
243
243
244
244
/**
@@ -299,7 +299,7 @@ private function dumpValue(mixed $value): mixed
299
299
if (\is_array ($ value )) {
300
300
$ code = [];
301
301
foreach ($ value as $ k => $ v ) {
302
- $ code [$ k ] = $ this ->dumpValue ($ v );
302
+ $ code [$ this -> container -> resolveEnvPlaceholders ( $ k ) ] = $ this ->dumpValue ($ v );
303
303
}
304
304
305
305
return $ code ;
@@ -319,7 +319,7 @@ private function dumpValue(mixed $value): mixed
319
319
throw new RuntimeException (sprintf ('Unable to dump a service container if a parameter is an object or a resource, got "%s". ' , get_debug_type ($ value )));
320
320
}
321
321
322
- return $ value ;
322
+ return $ this -> container -> resolveEnvPlaceholders ( $ value) ;
323
323
}
324
324
325
325
private function getServiceCall (string $ id , ?Reference $ reference = null ): string
@@ -359,7 +359,7 @@ private function prepareParameters(array $parameters, bool $escape = true): arra
359
359
$ filtered [$ key ] = $ value ;
360
360
}
361
361
362
- return $ escape ? $ this ->escape ($ filtered ) : $ filtered ;
362
+ return $ escape ? $ this ->container -> resolveEnvPlaceholders ( $ this -> escape ($ filtered) ) : $ filtered ;
363
363
}
364
364
365
365
private function escape (array $ arguments ): array
0 commit comments