|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace Symfony\Component\DependencyInjection\Loader\Configurator; |
| 4 | + |
| 5 | +return static function (ContainerConfigurator $container) { |
| 6 | + $services = $container->services(); |
| 7 | + |
| 8 | + $services->defaults() |
| 9 | + ->private(); |
| 10 | + |
| 11 | + $services->alias('Sentry\ClientInterface', 'sentry.client'); |
| 12 | + |
| 13 | + $services->set('Sentry\State\HubInterface') |
| 14 | + ->factory(['Sentry\State\HubAdapter', 'getInstance']) |
| 15 | + ->call('bindClient', [service('Sentry\ClientInterface')]); |
| 16 | + |
| 17 | + $services->alias('Sentry\SentryBundle\EventListener\ConsoleCommandListener', 'Sentry\SentryBundle\EventListener\ConsoleListener'); |
| 18 | + |
| 19 | + $services->set('Sentry\SentryBundle\EventListener\ConsoleListener', 'Sentry\SentryBundle\EventListener\ConsoleListener') |
| 20 | + ->args([service('Sentry\State\HubInterface')]) |
| 21 | + ->tag('kernel.event_listener', ['event' => 'console.command', 'method' => 'handleConsoleCommandEvent', 'priority' => 128]) |
| 22 | + ->tag('kernel.event_listener', ['event' => 'console.terminate', 'method' => 'handleConsoleTerminateEvent', 'priority' => -64]) |
| 23 | + ->tag('kernel.event_listener', ['event' => 'console.error', 'method' => 'handleConsoleErrorEvent', 'priority' => -64]); |
| 24 | + |
| 25 | + $services->set('Sentry\SentryBundle\EventListener\ErrorListener', 'Sentry\SentryBundle\EventListener\ErrorListener') |
| 26 | + ->args([service('Sentry\State\HubInterface')]) |
| 27 | + ->tag('kernel.event_listener', ['event' => 'kernel.exception', 'method' => 'handleExceptionEvent', 'priority' => 128]); |
| 28 | + |
| 29 | + $services->set('Sentry\SentryBundle\EventListener\RequestListener', 'Sentry\SentryBundle\EventListener\RequestListener') |
| 30 | + ->args([service('Sentry\State\HubInterface')]) |
| 31 | + ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'handleKernelRequestEvent', 'priority' => 5]) |
| 32 | + ->tag('kernel.event_listener', ['event' => 'kernel.controller', 'method' => 'handleKernelControllerEvent', 'priority' => 10]); |
| 33 | + |
| 34 | + $services->set('Sentry\SentryBundle\EventListener\SubRequestListener', 'Sentry\SentryBundle\EventListener\SubRequestListener') |
| 35 | + ->args([service('Sentry\State\HubInterface')]) |
| 36 | + ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'handleKernelRequestEvent', 'priority' => 3]) |
| 37 | + ->tag('kernel.event_listener', ['event' => 'kernel.finish_request', 'method' => 'handleKernelFinishRequestEvent', 'priority' => 5]); |
| 38 | + |
| 39 | + $services->set('Sentry\SentryBundle\EventListener\TracingRequestListener', 'Sentry\SentryBundle\EventListener\TracingRequestListener') |
| 40 | + ->args([ |
| 41 | + service('Sentry\State\HubInterface'), |
| 42 | + service('Sentry\Integration\RequestFetcherInterface'), |
| 43 | + ]) |
| 44 | + ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'handleKernelRequestEvent', 'priority' => 4]) |
| 45 | + ->tag('kernel.event_listener', ['event' => 'kernel.response', 'method' => 'handleKernelResponseEvent', 'priority' => 15]) |
| 46 | + ->tag('kernel.event_listener', ['event' => 'kernel.terminate', 'method' => 'handleKernelTerminateEvent', 'priority' => 5]); |
| 47 | + |
| 48 | + $services->set('Sentry\SentryBundle\EventListener\TracingSubRequestListener', 'Sentry\SentryBundle\EventListener\TracingSubRequestListener') |
| 49 | + ->args([service('Sentry\State\HubInterface')]) |
| 50 | + ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'handleKernelRequestEvent', 'priority' => 2]) |
| 51 | + ->tag('kernel.event_listener', ['event' => 'kernel.finish_request', 'method' => 'handleKernelFinishRequestEvent', 'priority' => 10]) |
| 52 | + ->tag('kernel.event_listener', ['event' => 'kernel.response', 'method' => 'handleKernelResponseEvent', 'priority' => 15]); |
| 53 | + |
| 54 | + $services->set('Sentry\SentryBundle\EventListener\TracingConsoleListener', 'Sentry\SentryBundle\EventListener\TracingConsoleListener') |
| 55 | + ->args([ |
| 56 | + service('Sentry\State\HubInterface'), |
| 57 | + '', |
| 58 | + ]) |
| 59 | + ->tag('kernel.event_listener', ['event' => 'console.command', 'method' => 'handleConsoleCommandEvent', 'priority' => 118]) |
| 60 | + ->tag('kernel.event_listener', ['event' => 'console.terminate', 'method' => 'handleConsoleTerminateEvent', 'priority' => -54]); |
| 61 | + |
| 62 | + $services->set('Sentry\SentryBundle\EventListener\MessengerListener', 'Sentry\SentryBundle\EventListener\MessengerListener') |
| 63 | + ->args([service('Sentry\State\HubInterface')]) |
| 64 | + ->tag('kernel.event_listener', ['event' => 'Symfony\Component\Messenger\Event\WorkerMessageFailedEvent', 'method' => 'handleWorkerMessageFailedEvent', 'priority' => 50]) |
| 65 | + ->tag('kernel.event_listener', ['event' => 'Symfony\Component\Messenger\Event\WorkerMessageHandledEvent', 'method' => 'handleWorkerMessageHandledEvent', 'priority' => 50]) |
| 66 | + ->tag('kernel.event_listener', ['event' => 'Symfony\Component\Messenger\Event\WorkerMessageReceivedEvent', 'method' => 'handleWorkerMessageReceivedEvent', 'priority' => 50]); |
| 67 | + |
| 68 | + $services->set('Sentry\SentryBundle\EventListener\LoginListener', 'Sentry\SentryBundle\EventListener\LoginListener') |
| 69 | + ->args([ |
| 70 | + service('Sentry\State\HubInterface'), |
| 71 | + service('security.token_storage')->ignoreOnInvalid(), |
| 72 | + ]) |
| 73 | + ->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'handleKernelRequestEvent']); |
| 74 | + |
| 75 | + $services->set('Sentry\SentryBundle\EventListener\LogRequestListener', 'Sentry\SentryBundle\EventListener\LogRequestListener') |
| 76 | + ->tag('kernel.event_listener', ['event' => 'kernel.terminate', 'method' => 'handleKernelTerminateEvent', 'priority' => 10]); |
| 77 | + |
| 78 | + $services->set('Sentry\SentryBundle\Command\SentryTestCommand', 'Sentry\SentryBundle\Command\SentryTestCommand') |
| 79 | + ->args([service('Sentry\State\HubInterface')]) |
| 80 | + ->tag('console.command', ['command' => 'sentry:test']); |
| 81 | + |
| 82 | + $services->alias('Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverConnectionFactoryInterface', 'Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverConnectionFactory'); |
| 83 | + |
| 84 | + $services->set('Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverConnectionFactory', 'Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverConnectionFactory') |
| 85 | + ->args([service('Sentry\State\HubInterface')]); |
| 86 | + |
| 87 | + $services->set('Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverMiddleware', 'Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverMiddleware') |
| 88 | + ->args([service('Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverConnectionFactoryInterface')]); |
| 89 | + |
| 90 | + $services->set('Sentry\SentryBundle\Tracing\Doctrine\DBAL\ConnectionConfigurator', 'Sentry\SentryBundle\Tracing\Doctrine\DBAL\ConnectionConfigurator') |
| 91 | + ->args([service('Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverMiddleware')]); |
| 92 | + |
| 93 | + $services->set('Sentry\SentryBundle\Tracing\Twig\TwigTracingExtension', 'Sentry\SentryBundle\Tracing\Twig\TwigTracingExtension') |
| 94 | + ->args([service('Sentry\State\HubInterface')]) |
| 95 | + ->tag('twig.extension'); |
| 96 | + |
| 97 | + $services->set('sentry.tracing.traceable_cache_adapter', 'Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapter') |
| 98 | + ->abstract() |
| 99 | + ->args([ |
| 100 | + service('Sentry\State\HubInterface'), |
| 101 | + '', |
| 102 | + ]); |
| 103 | + |
| 104 | + $services->set('sentry.tracing.traceable_tag_aware_cache_adapter', 'Sentry\SentryBundle\Tracing\Cache\TraceableTagAwareCacheAdapter') |
| 105 | + ->abstract() |
| 106 | + ->args([ |
| 107 | + service('Sentry\State\HubInterface'), |
| 108 | + '', |
| 109 | + ]); |
| 110 | + |
| 111 | + $services->set('Sentry\SentryBundle\Integration\IntegrationConfigurator', 'Sentry\SentryBundle\Integration\IntegrationConfigurator') |
| 112 | + ->args([ |
| 113 | + [], |
| 114 | + '', |
| 115 | + ]); |
| 116 | + |
| 117 | + $services->set('Sentry\Integration\RequestFetcherInterface', 'Sentry\SentryBundle\Integration\RequestFetcher') |
| 118 | + ->args([ |
| 119 | + service('Symfony\Component\HttpFoundation\RequestStack'), |
| 120 | + service('Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface')->nullOnInvalid(), |
| 121 | + ]); |
| 122 | + |
| 123 | + $services->set('Sentry\SentryBundle\Twig\SentryExtension', 'Sentry\SentryBundle\Twig\SentryExtension') |
| 124 | + ->tag('twig.extension'); |
| 125 | +}; |
0 commit comments