‪TYPO3CMS  ‪main
ServiceProvider.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
18 namespace ‪TYPO3\CMS\Core;
19 
20 use Psr\Container\ContainerInterface;
21 use Psr\EventDispatcher\EventDispatcherInterface;
22 use Symfony\Component\Console\Command\HelpCommand;
23 use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as SymfonyEventDispatcherInterface;
24 use ‪TYPO3\CMS\Core\Adapter\EventDispatcherAdapter as SymfonyEventDispatcher;
30 use TYPO3\CMS\Core\DependencyInjection\ContainerBuilder;
33 use TYPO3\CMS\Core\Package\PackageManager;
37 
42 {
43  protected static function ‪getPackagePath(): string
44  {
45  return __DIR__ . '/../';
46  }
47 
48  protected static function ‪getPackageName(): string
49  {
50  return 'typo3/cms-core';
51  }
52 
53  public function ‪getFactories(): array
54  {
55  return [
56  SymfonyEventDispatcher::class => ‪self::getSymfonyEventDispatcher(...),
57  Cache\CacheManager::class => ‪self::getCacheManager(...),
58  Database\ConnectionPool::class => ‪self::getConnectionPool(...),
59  Database\DriverMiddlewareService::class => ‪self::getDriverMiddlewaresService(...),
60  Charset\CharsetConverter::class => ‪self::getCharsetConverter(...),
61  Configuration\Loader\YamlFileLoader::class => ‪self::getYamlFileLoader(...),
62  Configuration\SiteWriter::class => ‪self::getSiteWriter(...),
63  Command\ListCommand::class => ‪self::getListCommand(...),
64  HelpCommand::class => ‪self::getHelpCommand(...),
65  Command\CacheFlushCommand::class => ‪self::getCacheFlushCommand(...),
66  Command\CacheWarmupCommand::class => ‪self::getCacheWarmupCommand(...),
67  Command\DumpAutoloadCommand::class => ‪self::getDumpAutoloadCommand(...),
68  Console\CommandApplication::class => ‪self::getConsoleCommandApplication(...),
69  Console\CommandRegistry::class => ‪self::getConsoleCommandRegistry(...),
70  Context\Context::class => ‪self::getContext(...),
71  Core\BootService::class => ‪self::getBootService(...),
72  Crypto\HashService::class => ‪self::getHashService(...),
73  Crypto\PasswordHashing\PasswordHashFactory::class => ‪self::getPasswordHashFactory(...),
74  Database\Schema\SchemaMigrator::class => ‪self::getSchemaMigrator(...),
75  Database\Schema\Parser\Parser::class => ‪self::getSchemaParser(...),
76  EventDispatcher\EventDispatcher::class => ‪self::getEventDispatcher(...),
77  EventDispatcher\ListenerProvider::class => ‪self::getEventListenerProvider(...),
78  FormProtection\FormProtectionFactory::class => ‪self::getFormProtectionFactory(...),
79  Http\Application::class => ‪self::getHttpApplication(...),
80  Http\RequestHandler::class => ‪self::getHttpRequestHandler(...),
81  Http\Client\GuzzleClientFactory::class => ‪self::getGuzzleClientFactory(...),
82  Http\MiddlewareStackResolver::class => ‪self::getMiddlewareStackResolver(...),
83  Http\RequestFactory::class => ‪self::getRequestFactory(...),
84  Imaging\IconFactory::class => ‪self::getIconFactory(...),
85  Imaging\IconRegistry::class => ‪self::getIconRegistry(...),
86  Localization\LanguageServiceFactory::class => ‪self::getLanguageServiceFactory(...),
87  Localization\LanguageStore::class => ‪self::getLanguageStore(...),
88  Localization\Locales::class => ‪self::getLocales(...),
89  Localization\LocalizationFactory::class => ‪self::getLocalizationFactory(...),
90  Mail\TransportFactory::class => ‪self::getMailTransportFactory(...),
91  Messaging\FlashMessageService::class => ‪self::getFlashMessageService(...),
92  Middleware\ResponsePropagation::class => ‪self::getResponsePropagationMiddleware(...),
93  Middleware\VerifyHostHeader::class => ‪self::getVerifyHostHeaderMiddleware(...),
94  Package\FailsafePackageManager::class => ‪self::getFailsafePackageManager(...),
95  Package\Cache\PackageDependentCacheIdentifier::class => ‪self::getPackageDependentCacheIdentifier(...),
96  Routing\BackendEntryPointResolver::class => ‪self::getBackendEntryPointResolver(...),
97  Routing\RequestContextFactory::class => ‪self::getRequestContextFactory(...),
98  Registry::class => ‪self::getRegistry(...),
99  Resource\Index\FileIndexRepository::class => ‪self::getFileIndexRepository(...),
100  Resource\Index\MetaDataRepository::class => ‪self::getMetaDataRepository(...),
101  Resource\Driver\DriverRegistry::class => ‪self::getDriverRegistry(...),
102  Resource\ProcessedFileRepository::class => ‪self::getProcessedFileRepository(...),
103  Resource\ResourceFactory::class => ‪self::getResourceFactory(...),
104  Resource\StorageRepository::class => ‪self::getStorageRepository(...),
105  Service\DependencyOrderingService::class => ‪self::getDependencyOrderingService(...),
106  Service\FlexFormService::class => ‪self::getFlexFormService(...),
107  Service\OpcodeCacheService::class => ‪self::getOpcodeCacheService(...),
108  TypoScript\TypoScriptStringFactory::class => ‪self::getTypoScriptStringFactory(...),
109  TypoScript\TypoScriptService::class => ‪self::getTypoScriptService(...),
110  TypoScript\AST\Traverser\AstTraverser::class => ‪self::getAstTraverser(...),
111  TypoScript\AST\CommentAwareAstBuilder::class => ‪self::getCommentAwareAstBuilder(...),
112  TypoScript\Tokenizer\LosslessTokenizer::class => [ self::class, 'getLosslessTokenizer'],
113  'icons' => ‪self::getIcons(...),
114  'middlewares' => ‪self::getMiddlewares(...),
115  'core.middlewares' => ‪self::getCoreMiddlewares(...),
116  'content.security.policies' => ‪self::getContentSecurityPolicies(...),
117  ];
118  }
119 
120  public function ‪getExtensions(): array
121  {
122  return [
123  Console\CommandRegistry::class => ‪self::configureCommands(...),
124  Imaging\IconRegistry::class => ‪self::configureIconRegistry(...),
125  EventDispatcherInterface::class => ‪self::provideFallbackEventDispatcher(...),
126  EventDispatcher\ListenerProvider::class => ‪self::extendEventListenerProvider(...),
127  ] + parent::getExtensions();
128  }
129 
130  public static function ‪getSymfonyEventDispatcher(ContainerInterface $container): SymfonyEventDispatcherInterface
131  {
132  return ‪self::new($container, SymfonyEventDispatcher::class, [
133  $container->get(EventDispatcherInterface::class),
134  ]);
135  }
136 
137  public static function ‪getCacheManager(ContainerInterface $container): Cache\‪CacheManager
138  {
139  if (!$container->get('boot.state')->complete) {
140  throw new \LogicException(Cache\CacheManager::class . ' can not be injected/instantiated during ext_localconf.php or TCA loading. Use lazy loading instead.', 1638976434);
141  }
142 
143  $cacheConfigurations = ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] ?? [];
144  $disableCaching = $container->get('boot.state')->cacheDisabled;
145  $defaultCaches = [
146  $container->get('cache.core'),
147  $container->get('cache.assets'),
148  $container->get('cache.di'),
149  ];
150 
151  $cacheManager = ‪self::new($container, Cache\CacheManager::class, [$disableCaching]);
152  $cacheManager->setCacheConfigurations($cacheConfigurations);
153  $cacheConfigurations['di']['groups'] = ['system'];
154  foreach ($defaultCaches as $cache) {
155  $cacheManager->registerCache($cache, $cacheConfigurations[$cache->getIdentifier()]['groups'] ?? ['all']);
156  }
157 
158  return $cacheManager;
159  }
160 
161  public static function ‪getConnectionPool(ContainerInterface $container): Database\‪ConnectionPool
162  {
163  if (!$container->get('boot.state')->complete) {
164  throw new \LogicException(Database\ConnectionPool::class . ' can not be injected/instantiated during ext_localconf.php or TCA loading. Use lazy loading instead.', 1638976490);
165  }
166 
167  return ‪self::new($container, Database\ConnectionPool::class);
168  }
169 
170  public static function ‪getDriverMiddlewaresService(ContainerInterface $container): Database\DriverMiddlewareService
171  {
172  return ‪self::new($container, Database\DriverMiddlewareService::class, [
173  $container->get(Service\DependencyOrderingService::class),
174  ]);
175  }
176 
177  public static function ‪getCharsetConverter(ContainerInterface $container): Charset\CharsetConverter
178  {
179  return ‪self::new($container, Charset\CharsetConverter::class);
180  }
181 
182  public static function ‪getYamlFileLoader(ContainerInterface $container): Configuration\Loader\YamlFileLoader
183  {
184  return ‪self::new($container, Configuration\Loader\YamlFileLoader::class);
185  }
186 
187  public static function ‪getSiteWriter(ContainerInterface $container): Configuration\SiteWriter
188  {
189  return ‪self::new($container, Configuration\SiteWriter::class, [
190  ‪Environment::getConfigPath() . '/sites',
191  $container->get(EventDispatcherInterface::class),
192  $container->get('cache.core'),
193  ]);
194  }
195 
196  public static function ‪getListCommand(ContainerInterface $container): Command\ListCommand
197  {
198  return new ‪Command\ListCommand(
199  $container,
200  $container->get(Core\BootService::class)
201  );
202  }
203 
204  public static function ‪getHelpCommand(ContainerInterface $container): HelpCommand
205  {
206  return new HelpCommand();
207  }
208 
209  public static function ‪getCacheFlushCommand(ContainerInterface $container): Command\CacheFlushCommand
210  {
211  return new ‪Command\CacheFlushCommand(
212  $container->get(Core\BootService::class),
213  $container->get('cache.di')
214  );
215  }
216 
217  public static function ‪getCacheWarmupCommand(ContainerInterface $container): Command\CacheWarmupCommand
218  {
220  $container->get(ContainerBuilder::class),
221  $container->get(Package\PackageManager::class),
222  $container->get(Core\BootService::class),
223  $container->get('cache.di')
224  );
225  }
226 
227  public static function ‪getDumpAutoloadCommand(ContainerInterface $container): Command\DumpAutoloadCommand
228  {
229  return new ‪Command\DumpAutoloadCommand();
230  }
231 
232  public static function ‪getConsoleCommandApplication(ContainerInterface $container): Console\CommandApplication
233  {
235  $container->get(Context\Context::class),
236  $container->get(Console\CommandRegistry::class),
237  $container->get(SymfonyEventDispatcher::class),
238  $container->get(Configuration\ConfigurationManager::class),
239  $container->get(Core\BootService::class),
240  $container->get(Localization\LanguageServiceFactory::class)
241  );
242  }
243 
244  public static function ‪getConsoleCommandRegistry(ContainerInterface $container): Console\CommandRegistry
245  {
246  return new ‪Console\CommandRegistry($container);
247  }
248 
249  public static function ‪getEventDispatcher(ContainerInterface $container): EventDispatcher\EventDispatcher
250  {
252  $container->get(EventDispatcher\ListenerProvider::class)
253  );
254  }
255 
256  public static function ‪getEventListenerProvider(ContainerInterface $container): EventDispatcher\ListenerProvider
257  {
258  return new ‪EventDispatcher\ListenerProvider($container);
259  }
260 
261  public static function ‪extendEventListenerProvider(
262  ContainerInterface $container,
263  EventDispatcher\ListenerProvider $listenerProvider
264  ): EventDispatcher\ListenerProvider {
265  $listenerProvider->addListener(
266  Package\Event\PackagesMayHaveChangedEvent::class,
267  Package\PackageManager::class,
268  'packagesMayHaveChanged'
269  );
270 
271  $cacheWarmers = [
272  Http\MiddlewareStackResolver::class,
273  Imaging\IconRegistry::class,
274  Package\PackageManager::class,
275  ];
276  foreach ($cacheWarmers as $service) {
277  $listenerProvider->addListener(Cache\Event\CacheWarmupEvent::class, $service, 'warmupCaches');
278  }
279 
280  $listenerProvider->addListener(Cache\Event\CacheFlushEvent::class, Cache\CacheManager::class, 'handleCacheFlushEvent');
281 
282  return $listenerProvider;
283  }
284 
285  public static function ‪getContext(ContainerInterface $container): Context\Context
286  {
287  return new ‪Context\Context();
288  }
289 
290  public static function ‪getBootService(ContainerInterface $container): Core\BootService
291  {
292  if ($container->has('_early.boot-service')) {
293  return $container->get('_early.boot-service');
294  }
295  return new ‪Core\BootService(
296  $container->get(ContainerBuilder::class),
297  $container
298  );
299  }
300 
301  public static function ‪getPasswordHashFactory(ContainerInterface $container): Crypto\PasswordHashing\PasswordHashFactory
302  {
304  }
305 
306  public static function ‪getSchemaMigrator(ContainerInterface $container): Database\Schema\SchemaMigrator
307  {
308  return ‪self::new($container, Database\Schema\SchemaMigrator::class, [
309  $container->get(Database\ConnectionPool::class),
310  $container->get(Database\Schema\Parser\Parser::class),
311  new ‪DefaultTcaSchema(),
312  ]);
313  }
314 
315  public static function ‪getSchemaParser(ContainerInterface $container): Database\Schema\Parser\Parser
316  {
317  return ‪self::new($container, Database\Schema\Parser\Parser::class, [
318  new ‪Lexer(),
319  ]);
320  }
321 
322  public static function ‪getIconFactory(ContainerInterface $container): Imaging\IconFactory
323  {
324  return ‪self::new($container, Imaging\IconFactory::class, [
325  $container->get(EventDispatcherInterface::class),
326  $container->get(Imaging\IconRegistry::class),
327  $container,
328  ]);
329  }
330 
331  public static function ‪configureIconRegistry(ContainerInterface $container, ‪IconRegistry $iconRegistry): ‪IconRegistry
332  {
333  $cache = $container->get('cache.core');
334 
335  $cacheIdentifier = $container->get(Package\Cache\PackageDependentCacheIdentifier::class)->withPrefix('Icons')->toString();
336  $iconsFromPackages = $cache->require($cacheIdentifier);
337  if ($iconsFromPackages === false) {
338  $iconsFromPackages = $container->get('icons')->getArrayCopy();
339  $cache->set($cacheIdentifier, 'return ' . var_export($iconsFromPackages, true) . ';');
340  }
341 
342  foreach ($iconsFromPackages as $icon => $options) {
343  $provider = $options['provider'] ?? null;
344  unset($options['provider']);
345  $options ??= [];
346  if ($provider === null && ($options['source'] ?? false)) {
347  $provider = $iconRegistry->‪detectIconProvider($options['source']);
348  }
349  if ($provider === null) {
350  continue;
351  }
352  $iconRegistry->‪registerIcon($icon, $provider, $options);
353  }
354  return $iconRegistry;
355  }
356 
357  public static function ‪getIcons(ContainerInterface $container): \ArrayObject
358  {
359  return new \ArrayObject();
360  }
361 
362  public static function ‪getIconRegistry(ContainerInterface $container): Imaging\‪IconRegistry
363  {
364  return ‪self::new($container, Imaging\IconRegistry::class, [$container->get('cache.assets'), $container->get(Package\Cache\PackageDependentCacheIdentifier::class)->withPrefix('BackendIcons')->toString()]);
365  }
366 
367  public static function ‪getLanguageServiceFactory(ContainerInterface $container): Localization\LanguageServiceFactory
368  {
369  return ‪self::new($container, Localization\LanguageServiceFactory::class, [
370  $container->get(Localization\Locales::class),
371  $container->get(Localization\LocalizationFactory::class),
372  $container->get(Cache\CacheManager::class)->getCache('runtime'),
373  ]);
374  }
375 
376  public static function ‪getLanguageStore(ContainerInterface $container): Localization\LanguageStore
377  {
378  return ‪self::new($container, Localization\LanguageStore::class, [$container->get(PackageManager::class)]);
379  }
380 
381  public static function ‪getLocales(ContainerInterface $container): Localization\Locales
382  {
383  return ‪self::new($container, Localization\Locales::class);
384  }
385 
386  public static function ‪getLocalizationFactory(ContainerInterface $container): Localization\LocalizationFactory
387  {
388  return ‪self::new($container, Localization\LocalizationFactory::class, [
389  $container->get(Localization\LanguageStore::class),
390  $container->get(Cache\CacheManager::class),
391  ]);
392  }
393 
394  public static function ‪getMailTransportFactory(ContainerInterface $container): Mail\TransportFactory
395  {
396  return ‪self::new($container, Mail\TransportFactory::class, [
397  $container->get(SymfonyEventDispatcher::class),
398  $container->get(Log\LogManager::class),
399  ]);
400  }
401 
402  public static function ‪getFlashMessageService(ContainerInterface $container): Messaging\FlashMessageService
403  {
404  return ‪self::new($container, Messaging\FlashMessageService::class);
405  }
406 
407  public static function ‪getResponsePropagationMiddleware(ContainerInterface $container): Middleware\ResponsePropagation
408  {
409  return ‪self::new($container, Middleware\ResponsePropagation::class);
410  }
411 
412  public static function ‪getVerifyHostHeaderMiddleware(ContainerInterface $container): Middleware\VerifyHostHeader
413  {
414  return ‪self::new($container, Middleware\VerifyHostHeader::class, [
415  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] ?? '',
416  ]);
417  }
418 
419  public static function ‪getFailsafePackageManager(ContainerInterface $container): Package\FailsafePackageManager
420  {
421  $packageManager = $container->get(Package\PackageManager::class);
422  if ($packageManager instanceof Package\FailsafePackageManager) {
423  return $packageManager;
424  }
425  throw new \RuntimeException('FailsafePackageManager can only be instantiated in failsafe (maintenance tool) mode.', 1586861816);
426  }
427 
428  public static function ‪getPackageDependentCacheIdentifier(ContainerInterface $container): Package\Cache\PackageDependentCacheIdentifier
429  {
430  return new ‪Package\Cache\PackageDependentCacheIdentifier($container->get(Package\PackageManager::class));
431  }
432 
433  public static function ‪getRegistry(ContainerInterface $container): ‪Registry
434  {
435  return ‪self::new($container, Registry::class);
436  }
437 
438  public static function ‪getFileIndexRepository(ContainerInterface $container): Resource\Index\FileIndexRepository
439  {
440  return ‪self::new($container, Resource\Index\FileIndexRepository::class, [
441  $container->get(EventDispatcherInterface::class),
442  ]);
443  }
444 
445  public static function ‪getMetaDataRepository(ContainerInterface $container): Resource\Index\MetaDataRepository
446  {
447  return ‪self::new($container, Resource\Index\MetaDataRepository::class, [
448  $container->get(EventDispatcherInterface::class),
449  ]);
450  }
451 
452  public static function ‪getDriverRegistry(ContainerInterface $container): Resource\Driver\DriverRegistry
453  {
454  return ‪self::new($container, Resource\Driver\DriverRegistry::class);
455  }
456 
457  public static function ‪getProcessedFileRepository(ContainerInterface $container): Resource\ProcessedFileRepository
458  {
459  return ‪self::new($container, Resource\ProcessedFileRepository::class, [
460  $container->get(ResourceFactory::class),
461  $container->get(Resource\Processing\TaskTypeRegistry::class),
462  ]);
463  }
464 
465  public static function ‪getResourceFactory(ContainerInterface $container): Resource\‪ResourceFactory
466  {
467  return ‪self::new($container, Resource\ResourceFactory::class, [
468  $container->get(Resource\StorageRepository::class),
469  ]);
470  }
471 
472  public static function ‪getStorageRepository(ContainerInterface $container): Resource\StorageRepository
473  {
474  return ‪self::new($container, Resource\StorageRepository::class, [
475  $container->get(EventDispatcherInterface::class),
476  $container->get(Resource\Driver\DriverRegistry::class),
477  ]);
478  }
479 
480  public static function ‪getDependencyOrderingService(ContainerInterface $container): Service\DependencyOrderingService
481  {
482  return new Service\DependencyOrderingService();
483  }
484 
485  public static function ‪getFlexFormService(ContainerInterface $container): Service\FlexFormService
486  {
487  return ‪self::new($container, Service\FlexFormService::class);
488  }
489 
490  public static function ‪getOpcodeCacheService(ContainerInterface $container): Service\OpcodeCacheService
491  {
492  return ‪self::new($container, Service\OpcodeCacheService::class);
493  }
494 
495  public static function ‪getTypoScriptStringFactory(ContainerInterface $container): TypoScript\TypoScriptStringFactory
496  {
497  return new ‪TypoScript\TypoScriptStringFactory($container, new ‪LossyTokenizer());
498  }
499 
500  public static function ‪getTypoScriptService(ContainerInterface $container): TypoScript\TypoScriptService
501  {
502  return ‪self::new($container, TypoScript\TypoScriptService::class);
503  }
504 
505  public static function ‪getAstTraverser(ContainerInterface $container): TypoScript\AST\Traverser\AstTraverser
506  {
507  return ‪self::new($container, TypoScript\AST\Traverser\AstTraverser::class);
508  }
509 
510  public static function ‪getCommentAwareAstBuilder(ContainerInterface $container): TypoScript\AST\CommentAwareAstBuilder
511  {
512  return ‪self::new($container, TypoScript\AST\CommentAwareAstBuilder::class, [
513  $container->get(EventDispatcherInterface::class),
514  ]);
515  }
516 
517  public static function ‪getLosslessTokenizer(ContainerInterface $container): TypoScript\Tokenizer\LosslessTokenizer
518  {
519  return ‪self::new($container, TypoScript\Tokenizer\LosslessTokenizer::class);
520  }
521 
522  public static function ‪getBackendEntryPointResolver(ContainerInterface $container): Routing\BackendEntryPointResolver
523  {
524  return ‪self::new($container, Routing\BackendEntryPointResolver::class);
525  }
526 
527  public static function ‪getHttpApplication(ContainerInterface $container): Http\Application
528  {
529  $requestHandler = new ‪Http\MiddlewareDispatcher(
530  $container->get(Http\RequestHandler::class),
531  $container->get('core.middlewares'),
532  );
533  return new ‪Http\Application(
534  $requestHandler,
535  $container->get(Configuration\ConfigurationManager::class),
536  );
537  }
538 
539  public static function ‪getHttpRequestHandler(ContainerInterface $container): Http\RequestHandler
540  {
541  return new ‪Http\RequestHandler(
542  $container,
543  $container->get(Routing\BackendEntryPointResolver::class),
544  );
545  }
546 
547  public static function ‪getRequestContextFactory(ContainerInterface $container): Routing\RequestContextFactory
548  {
549  return ‪self::new($container, Routing\RequestContextFactory::class, [
550  $container->get(Routing\BackendEntryPointResolver::class),
551  ]);
552  }
553 
554  public static function ‪getFormProtectionFactory(ContainerInterface $container): FormProtection\FormProtectionFactory
555  {
556  return ‪self::new(
557  $container,
558  FormProtection\FormProtectionFactory::class,
559  [
560  $container->get(Messaging\FlashMessageService::class),
561  $container->get(Localization\LanguageServiceFactory::class),
562  $container->get(Registry::class),
563  $container->get(CacheManager::class)->getCache('runtime'),
564  ]
565  );
566  }
567 
568  public static function ‪getGuzzleClientFactory(ContainerInterface $container): Http\Client\GuzzleClientFactory
569  {
571  }
572 
573  public static function ‪getRequestFactory(ContainerInterface $container): Http\RequestFactory
574  {
575  return new ‪Http\RequestFactory(
576  $container->get(Http\Client\GuzzleClientFactory::class)
577  );
578  }
579 
580  public static function ‪getMiddlewareStackResolver(ContainerInterface $container): Http\MiddlewareStackResolver
581  {
583  $container,
584  $container->get(Service\DependencyOrderingService::class),
585  $container->get('cache.core'),
586  $container->get(Package\Cache\PackageDependentCacheIdentifier::class)->toString(),
587  );
588  }
589 
590  public static function ‪getMiddlewares(ContainerInterface $container): \ArrayObject
591  {
592  return new \ArrayObject();
593  }
594 
595  public static function ‪getContentSecurityPolicies(ContainerInterface $container): ‪Map
596  {
597  return new ‪Map();
598  }
599 
600  public static function ‪getCoreMiddlewares(ContainerInterface $container): \ArrayObject
601  {
602  return new \ArrayObject($container->get(Http\MiddlewareStackResolver::class)->resolve('core'));
603  }
604 
605  public static function ‪getHashService(): ‪HashService
606  {
607  return new ‪HashService();
608  }
609 
610  public static function ‪provideFallbackEventDispatcher(
611  ContainerInterface $container,
612  EventDispatcherInterface $eventDispatcher = null
613  ): EventDispatcherInterface {
614  // Provide a dummy / empty event dispatcher for the install tool when $eventDispatcher is null (that means when we run without symfony DI)
615  return $eventDispatcher ?? new ‪EventDispatcher\EventDispatcher(
616  new EventDispatcher\ListenerProvider($container)
617  );
618  }
619 
620  public static function ‪configureCommands(ContainerInterface $container, Console\CommandRegistry $commandRegistry): Console\CommandRegistry
621  {
622  $commandRegistry->addLazyCommand('list', Command\ListCommand::class, 'Lists commands');
623 
624  $commandRegistry->addLazyCommand('help', HelpCommand::class, 'Displays help for a command');
625 
626  $commandRegistry->addLazyCommand('cache:warmup', Command\CacheWarmupCommand::class, 'Cache warmup for all, system or, if implemented, frontend caches.');
627 
628  $commandRegistry->addLazyCommand('cache:flush', Command\CacheFlushCommand::class, 'Cache clearing for all, system or frontend caches.');
629 
630  $commandRegistry->addLazyCommand('dumpautoload', Command\DumpAutoloadCommand::class, 'Updates class loading information in non-composer mode.', ‪Environment::isComposerMode());
631  $commandRegistry->addLazyCommand('extensionmanager:extension:dumpclassloadinginformation', Command\DumpAutoloadCommand::class, null, ‪Environment::isComposerMode(), false, 'dumpautoload');
632  $commandRegistry->addLazyCommand('extension:dumpclassloadinginformation', Command\DumpAutoloadCommand::class, null, ‪Environment::isComposerMode(), false, 'dumpautoload');
633 
634  return $commandRegistry;
635  }
636 }
‪TYPO3\CMS\Core\Command\ListCommand
Definition: ListCommand.php:34
‪TYPO3\CMS\Core\ServiceProvider\getBootService
‪static getBootService(ContainerInterface $container)
Definition: ServiceProvider.php:290
‪TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory
Definition: PasswordHashFactory.php:27
‪TYPO3\CMS\Core\ServiceProvider\getBackendEntryPointResolver
‪static getBackendEntryPointResolver(ContainerInterface $container)
Definition: ServiceProvider.php:522
‪TYPO3\CMS\Core\Package\AbstractServiceProvider
Definition: AbstractServiceProvider.php:38
‪TYPO3\CMS\Core\Command\DumpAutoloadCommand
Definition: DumpAutoloadCommand.php:31
‪TYPO3\CMS\Core\ServiceProvider\getRequestContextFactory
‪static getRequestContextFactory(ContainerInterface $container)
Definition: ServiceProvider.php:547
‪TYPO3\CMS\Core\ServiceProvider\getHelpCommand
‪static getHelpCommand(ContainerInterface $container)
Definition: ServiceProvider.php:204
‪TYPO3\CMS\Core\Command\CacheWarmupCommand
Definition: CacheWarmupCommand.php:36
‪TYPO3\CMS\Core\ServiceProvider\configureCommands
‪static configureCommands(ContainerInterface $container, Console\CommandRegistry $commandRegistry)
Definition: ServiceProvider.php:620
‪TYPO3\CMS\Core\ServiceProvider\getCacheFlushCommand
‪static getCacheFlushCommand(ContainerInterface $container)
Definition: ServiceProvider.php:209
‪TYPO3\CMS\Core\ServiceProvider\getSchemaParser
‪static getSchemaParser(ContainerInterface $container)
Definition: ServiceProvider.php:315
‪TYPO3\CMS\Core\Command\CacheFlushCommand
Definition: CacheFlushCommand.php:33
‪TYPO3\CMS\Core\ServiceProvider\getFlexFormService
‪static getFlexFormService(ContainerInterface $container)
Definition: ServiceProvider.php:485
‪TYPO3\CMS\Core\ServiceProvider\getOpcodeCacheService
‪static getOpcodeCacheService(ContainerInterface $container)
Definition: ServiceProvider.php:490
‪TYPO3\CMS\Core\ServiceProvider\getMiddlewareStackResolver
‪static getMiddlewareStackResolver(ContainerInterface $container)
Definition: ServiceProvider.php:580
‪TYPO3\CMS\Core\ServiceProvider\getFailsafePackageManager
‪static getFailsafePackageManager(ContainerInterface $container)
Definition: ServiceProvider.php:419
‪TYPO3\CMS\Core\ServiceProvider\getPackageName
‪static getPackageName()
Definition: ServiceProvider.php:48
‪TYPO3\CMS\Core\Core\Environment\isComposerMode
‪static isComposerMode()
Definition: Environment.php:137
‪TYPO3\CMS\Core\Registry
Definition: Registry.php:33
‪TYPO3\CMS\Core\ServiceProvider\getTypoScriptStringFactory
‪static getTypoScriptStringFactory(ContainerInterface $container)
Definition: ServiceProvider.php:495
‪TYPO3\CMS\Core\Package\Cache\PackageDependentCacheIdentifier
Definition: PackageDependentCacheIdentifier.php:30
‪TYPO3\CMS\Core\Http\MiddlewareStackResolver
Definition: MiddlewareStackResolver.php:31
‪TYPO3\CMS\Core\ServiceProvider\getHashService
‪static getHashService()
Definition: ServiceProvider.php:605
‪TYPO3\CMS\Core\Http\RequestHandler
Definition: RequestHandler.php:29
‪TYPO3\CMS\Core\ServiceProvider\getConsoleCommandRegistry
‪static getConsoleCommandRegistry(ContainerInterface $container)
Definition: ServiceProvider.php:244
‪TYPO3\CMS\Core\ServiceProvider\getAstTraverser
‪static getAstTraverser(ContainerInterface $container)
Definition: ServiceProvider.php:505
‪TYPO3\CMS\Core\Package\AbstractServiceProvider\new
‪static mixed new(ContainerInterface $container, string $className, array $constructorArguments=[])
Definition: AbstractServiceProvider.php:220
‪TYPO3\CMS\Core\ServiceProvider\getListCommand
‪static getListCommand(ContainerInterface $container)
Definition: ServiceProvider.php:196
‪TYPO3\CMS\Core\Http\Client\GuzzleClientFactory
Definition: GuzzleClientFactory.php:28
‪TYPO3\CMS\Core\Core\BootService
Definition: BootService.php:35
‪TYPO3\CMS\Core\ServiceProvider\getDependencyOrderingService
‪static getDependencyOrderingService(ContainerInterface $container)
Definition: ServiceProvider.php:480
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\ServiceProvider\configureIconRegistry
‪static configureIconRegistry(ContainerInterface $container, IconRegistry $iconRegistry)
Definition: ServiceProvider.php:331
‪TYPO3\CMS\Core\Console\CommandApplication
Definition: CommandApplication.php:42
‪TYPO3\CMS\Core\Core\Environment\getConfigPath
‪static getConfigPath()
Definition: Environment.php:212
‪TYPO3\CMS\Core\ServiceProvider\getDriverRegistry
‪static getDriverRegistry(ContainerInterface $container)
Definition: ServiceProvider.php:452
‪TYPO3\CMS\Core\Console\CommandRegistry
Definition: CommandRegistry.php:31
‪TYPO3\CMS\Core\ServiceProvider\getProcessedFileRepository
‪static getProcessedFileRepository(ContainerInterface $container)
Definition: ServiceProvider.php:457
‪TYPO3\CMS\Core\ServiceProvider\getDumpAutoloadCommand
‪static getDumpAutoloadCommand(ContainerInterface $container)
Definition: ServiceProvider.php:227
‪TYPO3\CMS\Core\Database\Schema\DefaultTcaSchema
Definition: DefaultTcaSchema.php:43
‪TYPO3\CMS\Core\ServiceProvider\getSymfonyEventDispatcher
‪static getSymfonyEventDispatcher(ContainerInterface $container)
Definition: ServiceProvider.php:130
‪TYPO3\CMS\Core\ServiceProvider\getPasswordHashFactory
‪static getPasswordHashFactory(ContainerInterface $container)
Definition: ServiceProvider.php:301
‪TYPO3\CMS\Core\Http\MiddlewareDispatcher
Definition: MiddlewareDispatcher.php:35
‪TYPO3\CMS\Core\ServiceProvider\getContentSecurityPolicies
‪static getContentSecurityPolicies(ContainerInterface $container)
Definition: ServiceProvider.php:595
‪TYPO3\CMS\Core\ServiceProvider\getEventDispatcher
‪static getEventDispatcher(ContainerInterface $container)
Definition: ServiceProvider.php:249
‪TYPO3\CMS\Core\ServiceProvider\getResponsePropagationMiddleware
‪static getResponsePropagationMiddleware(ContainerInterface $container)
Definition: ServiceProvider.php:407
‪TYPO3\CMS\Core\ServiceProvider\getIconFactory
‪static getIconFactory(ContainerInterface $container)
Definition: ServiceProvider.php:322
‪TYPO3\CMS\Core\Http\Application
Definition: Application.php:30
‪TYPO3\CMS\Core\ServiceProvider\getIcons
‪static getIcons(ContainerInterface $container)
Definition: ServiceProvider.php:357
‪TYPO3\CMS\Core\EventDispatcher\EventDispatcher
Definition: EventDispatcher.php:30
‪TYPO3\CMS\Core\ServiceProvider\getIconRegistry
‪static getIconRegistry(ContainerInterface $container)
Definition: ServiceProvider.php:362
‪TYPO3\CMS\Core\ServiceProvider\getHttpRequestHandler
‪static getHttpRequestHandler(ContainerInterface $container)
Definition: ServiceProvider.php:539
‪TYPO3\CMS\Core\ServiceProvider\getLocales
‪static getLocales(ContainerInterface $container)
Definition: ServiceProvider.php:381
‪TYPO3\CMS\Core\ServiceProvider\getStorageRepository
‪static getStorageRepository(ContainerInterface $container)
Definition: ServiceProvider.php:472
‪TYPO3\CMS\Core\ServiceProvider
Definition: ServiceProvider.php:42
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:42
‪TYPO3\CMS\Core\ServiceProvider\getCoreMiddlewares
‪static getCoreMiddlewares(ContainerInterface $container)
Definition: ServiceProvider.php:600
‪TYPO3\CMS\Core\ServiceProvider\getRegistry
‪static getRegistry(ContainerInterface $container)
Definition: ServiceProvider.php:433
‪TYPO3\CMS\Core\ServiceProvider\getCacheManager
‪static getCacheManager(ContainerInterface $container)
Definition: ServiceProvider.php:137
‪TYPO3\CMS\Core\Imaging\IconRegistry\registerIcon
‪registerIcon($identifier, $iconProviderClassName, array $options=[])
Definition: IconRegistry.php:332
‪TYPO3\CMS\Core\ServiceProvider\getMailTransportFactory
‪static getMailTransportFactory(ContainerInterface $container)
Definition: ServiceProvider.php:394
‪TYPO3\CMS\Core\Imaging\IconRegistry
Definition: IconRegistry.php:32
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36
‪TYPO3\CMS\Core\ServiceProvider\getConsoleCommandApplication
‪static getConsoleCommandApplication(ContainerInterface $container)
Definition: ServiceProvider.php:232
‪TYPO3\CMS\Core
‪TYPO3\CMS\Core\ServiceProvider\getFlashMessageService
‪static getFlashMessageService(ContainerInterface $container)
Definition: ServiceProvider.php:402
‪TYPO3\CMS\Core\ServiceProvider\getFactories
‪getFactories()
Definition: ServiceProvider.php:53
‪TYPO3\CMS\Core\ServiceProvider\getConnectionPool
‪static getConnectionPool(ContainerInterface $container)
Definition: ServiceProvider.php:161
‪TYPO3\CMS\Core\ServiceProvider\getPackagePath
‪static getPackagePath()
Definition: ServiceProvider.php:43
‪TYPO3\CMS\Core\ServiceProvider\getDriverMiddlewaresService
‪static getDriverMiddlewaresService(ContainerInterface $container)
Definition: ServiceProvider.php:170
‪TYPO3\CMS\Core\Http\RequestFactory
Definition: RequestFactory.php:30
‪TYPO3\CMS\Core\ServiceProvider\getCharsetConverter
‪static getCharsetConverter(ContainerInterface $container)
Definition: ServiceProvider.php:177
‪TYPO3\CMS\Core\Adapter\EventDispatcherAdapter
Definition: EventDispatcherAdapter.php:24
‪TYPO3\CMS\Core\ServiceProvider\getHttpApplication
‪static getHttpApplication(ContainerInterface $container)
Definition: ServiceProvider.php:527
‪TYPO3\CMS\Core\ServiceProvider\getCacheWarmupCommand
‪static getCacheWarmupCommand(ContainerInterface $container)
Definition: ServiceProvider.php:217
‪TYPO3\CMS\Core\ServiceProvider\getMiddlewares
‪static getMiddlewares(ContainerInterface $container)
Definition: ServiceProvider.php:590
‪TYPO3\CMS\Core\ServiceProvider\getFormProtectionFactory
‪static getFormProtectionFactory(ContainerInterface $container)
Definition: ServiceProvider.php:554
‪TYPO3\CMS\Core\ServiceProvider\getPackageDependentCacheIdentifier
‪static getPackageDependentCacheIdentifier(ContainerInterface $container)
Definition: ServiceProvider.php:428
‪TYPO3\CMS\Core\ServiceProvider\provideFallbackEventDispatcher
‪static provideFallbackEventDispatcher(ContainerInterface $container, EventDispatcherInterface $eventDispatcher=null)
Definition: ServiceProvider.php:610
‪TYPO3\CMS\Core\ServiceProvider\getCommentAwareAstBuilder
‪static getCommentAwareAstBuilder(ContainerInterface $container)
Definition: ServiceProvider.php:510
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\ServiceProvider\getMetaDataRepository
‪static getMetaDataRepository(ContainerInterface $container)
Definition: ServiceProvider.php:445
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Core\ServiceProvider\getLanguageStore
‪static getLanguageStore(ContainerInterface $container)
Definition: ServiceProvider.php:376
‪TYPO3\CMS\Core\ServiceProvider\getTypoScriptService
‪static getTypoScriptService(ContainerInterface $container)
Definition: ServiceProvider.php:500
‪TYPO3\CMS\Core\ServiceProvider\getResourceFactory
‪static getResourceFactory(ContainerInterface $container)
Definition: ServiceProvider.php:465
‪TYPO3\CMS\Core\ServiceProvider\getExtensions
‪getExtensions()
Definition: ServiceProvider.php:120
‪TYPO3\CMS\Core\ServiceProvider\getRequestFactory
‪static getRequestFactory(ContainerInterface $container)
Definition: ServiceProvider.php:573
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Core\ServiceProvider\getEventListenerProvider
‪static getEventListenerProvider(ContainerInterface $container)
Definition: ServiceProvider.php:256
‪TYPO3\CMS\Core\Imaging\IconRegistry\detectIconProvider
‪string detectIconProvider($iconReference)
Definition: IconRegistry.php:549
‪TYPO3\CMS\Core\ServiceProvider\getLosslessTokenizer
‪static getLosslessTokenizer(ContainerInterface $container)
Definition: ServiceProvider.php:517
‪TYPO3\CMS\Core\Type\Map
Definition: Map.php:47
‪TYPO3\CMS\Core\ServiceProvider\extendEventListenerProvider
‪static extendEventListenerProvider(ContainerInterface $container, EventDispatcher\ListenerProvider $listenerProvider)
Definition: ServiceProvider.php:261
‪TYPO3\CMS\Core\TypoScript\TypoScriptStringFactory
Definition: TypoScriptStringFactory.php:37
‪TYPO3\CMS\Core\ServiceProvider\getLocalizationFactory
‪static getLocalizationFactory(ContainerInterface $container)
Definition: ServiceProvider.php:386
‪TYPO3\CMS\Core\EventDispatcher\ListenerProvider
Definition: ListenerProvider.php:30
‪TYPO3\CMS\Core\Crypto\HashService
Definition: HashService.php:27
‪TYPO3\CMS\Core\ServiceProvider\getVerifyHostHeaderMiddleware
‪static getVerifyHostHeaderMiddleware(ContainerInterface $container)
Definition: ServiceProvider.php:412
‪TYPO3\CMS\Core\TypoScript\Tokenizer\LossyTokenizer
Definition: LossyTokenizer.php:57
‪TYPO3\CMS\Core\ServiceProvider\getLanguageServiceFactory
‪static getLanguageServiceFactory(ContainerInterface $container)
Definition: ServiceProvider.php:367
‪TYPO3\CMS\Core\ServiceProvider\getYamlFileLoader
‪static getYamlFileLoader(ContainerInterface $container)
Definition: ServiceProvider.php:182
‪TYPO3\CMS\Core\ServiceProvider\getSiteWriter
‪static getSiteWriter(ContainerInterface $container)
Definition: ServiceProvider.php:187
‪TYPO3\CMS\Core\ServiceProvider\getSchemaMigrator
‪static getSchemaMigrator(ContainerInterface $container)
Definition: ServiceProvider.php:306
‪TYPO3\CMS\Core\ServiceProvider\getContext
‪static getContext(ContainerInterface $container)
Definition: ServiceProvider.php:285
‪TYPO3\CMS\Core\Database\Schema\Parser\Lexer
Definition: Lexer.php:26
‪TYPO3\CMS\Core\ServiceProvider\getGuzzleClientFactory
‪static getGuzzleClientFactory(ContainerInterface $container)
Definition: ServiceProvider.php:568
‪TYPO3\CMS\Core\ServiceProvider\getFileIndexRepository
‪static getFileIndexRepository(ContainerInterface $container)
Definition: ServiceProvider.php:438