diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php index b1510bd..480e33b 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php @@ -34,7 +34,8 @@ public function process(ContainerBuilder $container) { $container->setDefinition($new_service_id, $definition); $container->register($service_id, $proxy_class) - ->setArguments([new Reference('service_container'), $new_service_id]); + ->setArguments([new Reference('service_container'), $new_service_id]) + ->setMethodCalls($definition->getMethodCalls()); } } } diff --git a/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php b/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php index 9ab429f..2001eea 100644 --- a/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php +++ b/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php @@ -14,7 +14,7 @@ /** * Defines a class which is capable of clearing the cache on plugin managers. */ -class CachedDiscoveryClearer { +class CachedDiscoveryClearer implements CachedDiscoveryClearerInterface { /** * The stored discoveries. @@ -24,18 +24,14 @@ class CachedDiscoveryClearer { protected $cachedDiscoveries = array(); /** - * Adds a plugin manager to the active list. - * - * @param \Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface $cached_discovery - * An object that implements the cached discovery interface, typically a - * plugin manager. + * {@inheritdoc} */ public function addCachedDiscovery(CachedDiscoveryInterface $cached_discovery) { $this->cachedDiscoveries[] = $cached_discovery; } /** - * Clears the cache on all cached discoveries. + * {@inheritdoc} */ public function clearCachedDefinitions() { foreach ($this->cachedDiscoveries as $cached_discovery) { diff --git a/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearerInterface.php b/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearerInterface.php new file mode 100644 index 0000000..05b0b00 --- /dev/null +++ b/core/lib/Drupal/Core/Plugin/CachedDiscoveryClearerInterface.php @@ -0,0 +1,31 @@ +cachedDiscoveries; };