function PhpDumper::addDeprecatedParameters
1 call to PhpDumper::addDeprecatedParameters()
- PhpDumper::startClass in vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php
File
-
vendor/
symfony/ dependency-injection/ Dumper/ PhpDumper.php, line 1417
Class
- PhpDumper
- PhpDumper dumps a service container as a PHP class.
Namespace
Symfony\Component\DependencyInjection\DumperCode
private function addDeprecatedParameters() : string {
if (!($bag = $this->container
->getParameterBag()) instanceof ParameterBag) {
return '';
}
if (!($deprecated = $bag->allDeprecated())) {
return '';
}
$code = '';
ksort($deprecated);
foreach ($deprecated as $param => $deprecation) {
$code .= ' ' . $this->doExport($param) . ' => [' . implode(', ', array_map($this->doExport(...), $deprecation)) . "],\n";
}
return " private const DEPRECATED_PARAMETERS = [\n{$code} ];\n\n";
}