UpdateServiceProvider.php in Drupal 8
File
core/lib/Drupal/Core/Update/UpdateServiceProvider.php
View source
<?php
namespace Drupal\Core\Update;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceModifierInterface;
use Drupal\Core\DependencyInjection\ServiceProviderInterface;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
class UpdateServiceProvider implements ServiceProviderInterface, ServiceModifierInterface {
public function register(ContainerBuilder $container) {
$definition = new Definition('Drupal\\Core\\Cache\\NullBackend', [
'null',
]);
$definition
->setDeprecated(TRUE, 'The "%service_id%\\" service is deprecated. While updating Drupal all caches use \\Drupal\\Core\\Update\\UpdateBackend. See https://www.drupal.org/node/3066407');
$container
->setDefinition('cache.null', $definition);
$container
->register('update.cache_factory', UpdateCacheBackendFactory::class)
->setDecoratedService('cache_factory')
->addArgument(new Reference('update.cache_factory.inner'));
$container
->addCompilerPass(new UpdateCompilerPass(), PassConfig::TYPE_REMOVE, 128);
}
public function alter(ContainerBuilder $container) {
if ($container
->hasDefinition('path_alias.path_processor')) {
$container
->getDefinition('path_alias.path_processor')
->clearTag('path_processor_inbound')
->clearTag('path_processor_outbound');
}
}
}