‪TYPO3CMS  10.4
Services.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 namespace ‪TYPO3\CMS\Core;
5 
6 use Psr\Http\Server\MiddlewareInterface;
7 use Psr\Http\Server\RequestHandlerInterface;
8 use Psr\Log\LoggerAwareInterface;
9 use Symfony\Component\DependencyInjection\ContainerBuilder;
10 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
11 
12 return function (ContainerConfigurator $container, ContainerBuilder $containerBuilder) {
13  $containerBuilder->registerForAutoconfiguration(SingletonInterface::class)->addTag('typo3.singleton');
14  $containerBuilder->registerForAutoconfiguration(LoggerAwareInterface::class)->addTag('psr.logger_aware');
15 
16  // Services, to be read from container-aware dispatchers (on demand), therefore marked 'public'
17  $containerBuilder->registerForAutoconfiguration(MiddlewareInterface::class)->addTag('typo3.middleware');
18  $containerBuilder->registerForAutoconfiguration(RequestHandlerInterface::class)->addTag('typo3.request_handler');
19 
20  $containerBuilder->addCompilerPass(new DependencyInjection\SingletonPass('typo3.singleton'));
21  $containerBuilder->addCompilerPass(new DependencyInjection\LoggerAwarePass('psr.logger_aware'));
22  $containerBuilder->addCompilerPass(new DependencyInjection\ListenerProviderPass('event.listener'));
23  $containerBuilder->addCompilerPass(new DependencyInjection\PublicServicePass('typo3.middleware'));
24  $containerBuilder->addCompilerPass(new DependencyInjection\PublicServicePass('typo3.request_handler'));
25  $containerBuilder->addCompilerPass(new DependencyInjection\ConsoleCommandPass('console.command'));
26  $containerBuilder->addCompilerPass(new DependencyInjection\AutowireInjectMethodsPass());
27 };
‪TYPO3\CMS\Core