From f457fb56037ddedf36059fcd4a0ce1998192ad80 Mon Sep 17 00:00:00 2001 From: Tac Tacelosky Date: Sun, 3 Dec 2023 17:26:18 -0500 Subject: [PATCH] Show compact way to implement a compiler pass --- service_container/compiler_passes.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/service_container/compiler_passes.rst b/service_container/compiler_passes.rst index fda044a1195..5e589bde24b 100644 --- a/service_container/compiler_passes.rst +++ b/service_container/compiler_passes.rst @@ -87,6 +87,17 @@ method in the extension):: } } +:doc:Implement process() directly in the bundle definition by extending AbstractBundle +and implementing CompilerPassInterface.:: + + class SurvosApiGridBundle extends AbstractBundle implements CompilerPassInterface + { + // The compiler pass + public function process(ContainerBuilder $container): void + { + + } + If you are using custom :doc:`service tags ` in a bundle then by convention, tag names consist of the name of the bundle (lowercase, underscores as separators), followed by a dot, and finally the