
| Current Path : /var/www/html/store/web/core/lib/Drupal/Core/DependencyInjection/Compiler/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/core/lib/Drupal/Core/DependencyInjection/Compiler/DeprecatedServicePass.php |
<?php
namespace Drupal\Core\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
/**
* Sets the _deprecated_service_list parameter.
*
* @see \Drupal\Component\DependencyInjection\Container::get()
*/
class DeprecatedServicePass implements CompilerPassInterface {
/**
* {@inheritdoc}
*/
public function process(ContainerBuilder $container) {
$deprecated_services = [];
foreach ($container->getDefinitions() as $service_id => $definition) {
if ($definition->isDeprecated()) {
$deprecated_services[$service_id] = $definition->getDeprecation($service_id)['message'];
}
}
foreach ($container->getAliases() as $service_id => $definition) {
if ($definition->isDeprecated()) {
$deprecated_services[$service_id] = $definition->getDeprecation($service_id)['message'];
}
}
$container->setParameter('_deprecated_service_list', $deprecated_services);
}
}