Mercurial > hg > isophonics-drupal-site
annotate core/lib/Drupal/Core/Update/UpdateServiceProvider.php @ 13:5fb285c0d0e3
Update Drupal core to 8.4.7 via Composer. Security update; I *think* we've
been lucky to get away with this so far, as we don't support self-registration
which seems to be used by the so-called "drupalgeddon 2" attack that 8.4.5
was vulnerable to.
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:33:26 +0100 |
parents | 4c8ae668cc8c |
children | af1871eacc83 |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\Core\Update; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\Core\DependencyInjection\ContainerBuilder; |
Chris@0 | 6 use Drupal\Core\DependencyInjection\ServiceModifierInterface; |
Chris@0 | 7 use Drupal\Core\DependencyInjection\ServiceProviderInterface; |
Chris@0 | 8 use Symfony\Component\DependencyInjection\Definition; |
Chris@0 | 9 use Symfony\Component\DependencyInjection\Reference; |
Chris@0 | 10 |
Chris@0 | 11 /** |
Chris@0 | 12 * Ensures for some services that they don't cache. |
Chris@0 | 13 */ |
Chris@0 | 14 class UpdateServiceProvider implements ServiceProviderInterface, ServiceModifierInterface { |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * {@inheritdoc} |
Chris@0 | 18 */ |
Chris@0 | 19 public function register(ContainerBuilder $container) { |
Chris@0 | 20 $definition = new Definition('Drupal\Core\Cache\NullBackend', ['null']); |
Chris@0 | 21 $container->setDefinition('cache.null', $definition); |
Chris@0 | 22 } |
Chris@0 | 23 |
Chris@0 | 24 /** |
Chris@0 | 25 * {@inheritdoc} |
Chris@0 | 26 */ |
Chris@0 | 27 public function alter(ContainerBuilder $container) { |
Chris@0 | 28 $definition = $container->getDefinition('asset.resolver'); |
Chris@0 | 29 $argument = new Reference('cache.null'); |
Chris@0 | 30 $definition->replaceArgument(5, $argument); |
Chris@0 | 31 |
Chris@0 | 32 $definition = $container->getDefinition('library.discovery.collector'); |
Chris@0 | 33 $argument = new Reference('cache.null'); |
Chris@0 | 34 $definition->replaceArgument(0, $argument); |
Chris@0 | 35 } |
Chris@0 | 36 |
Chris@0 | 37 } |