‪TYPO3CMS  ‪main
Services.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 namespace ‪TYPO3\CMS\Frontend;
6 
7 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8 use Symfony\Component\DependencyInjection\ContainerBuilder;
9 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
10 
11 return static function (ContainerConfigurator $containerConfigurator, ContainerBuilder $container) {
12  $container->addCompilerPass(new class () implements CompilerPassInterface {
13  public function process(ContainerBuilder $container): void
14  {
15  foreach ($container->findTaggedServiceIds('frontend.contentobject') as $id => $tags) {
16  $container->findDefinition($id)->setShared(false);
17  }
18  }
19  });
20 };
‪TYPO3\CMS\Frontend