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