.../DependencyInjection/Compiler/CacheabilitySafeguardsPass.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/CacheabilitySafeguardsPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/CacheabilitySafeguardsPass.php index c53ba11..75b15d7 100644 --- a/core/lib/Drupal/Core/DependencyInjection/Compiler/CacheabilitySafeguardsPass.php +++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/CacheabilitySafeguardsPass.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\DependencyInjection\Compiler\TaggedHandlersPass. + * Contains \Drupal\Core\DependencyInjection\Compiler\CacheabilitySafeguardsPass. */ namespace Drupal\Core\DependencyInjection\Compiler; @@ -15,6 +15,11 @@ /** * Decorates the 'cacheability_safeguard'-tagged services. + * + * There are two advantages to this being captured in a pass: + * 1. it runs later than ServiceModifierInterface implementations, thus ensuring + * that modules are still able to override the original service + * 2. it standardizes the pattern, and prevents the need for copy/pasting code. */ class CacheabilitySafeguardsPass implements CompilerPassInterface {