Skip to content

Commit a8e3a3a

Browse files
committed
feat: add support for symfony 8
1 parent 7ca997f commit a8e3a3a

File tree

5 files changed

+145
-307
lines changed

5 files changed

+145
-307
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- 5.*
3434
- 6.*
3535
- 7.*
36+
- 8.*
3637
dependencies:
3738
- highest
3839
exclude:

composer.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
"php": "^7.2||^8.0",
1616
"guzzlehttp/psr7": "^2.1.1",
1717
"jean85/pretty-package-versions": "^1.5||^2.0",
18-
"sentry/sentry": "^4.16.0",
18+
"sentry/sentry": "dev-master",
1919
"symfony/cache-contracts": "^1.1||^2.4||^3.0",
20-
"symfony/config": "^4.4.20||^5.0.11||^6.0||^7.0",
21-
"symfony/console": "^4.4.20||^5.0.11||^6.0||^7.0",
22-
"symfony/dependency-injection": "^4.4.20||^5.0.11||^6.0||^7.0",
23-
"symfony/event-dispatcher": "^4.4.20||^5.0.11||^6.0||^7.0",
24-
"symfony/http-kernel": "^4.4.20||^5.0.11||^6.0||^7.0",
20+
"symfony/config": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
21+
"symfony/console": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
22+
"symfony/dependency-injection": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
23+
"symfony/event-dispatcher": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
24+
"symfony/http-kernel": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
2525
"symfony/polyfill-php80": "^1.22",
26-
"symfony/psr-http-message-bridge": "^1.2||^2.0||^6.4||^7.0"
26+
"symfony/psr-http-message-bridge": "^1.2||^2.0||^6.4||^7.0||^8.0"
2727
},
2828
"require-dev": {
2929
"doctrine/dbal": "^2.13||^3.3||^4.0",
@@ -35,19 +35,19 @@
3535
"phpstan/phpstan-phpunit": "1.4.0",
3636
"phpstan/phpstan-symfony": "1.4.10",
3737
"phpunit/phpunit": "^8.5.40||^9.6.21",
38-
"symfony/browser-kit": "^4.4.20||^5.0.11||^6.0||^7.0",
39-
"symfony/cache": "^4.4.20||^5.0.11||^6.0||^7.0",
40-
"symfony/dom-crawler": "^4.4.20||^5.0.11||^6.0||^7.0",
41-
"symfony/framework-bundle": "^4.4.20||^5.0.11||^6.0||^7.0",
42-
"symfony/http-client": "^4.4.20||^5.0.11||^6.0||^7.0",
43-
"symfony/messenger": "^4.4.20||^5.0.11||^6.0||^7.0",
38+
"symfony/browser-kit": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
39+
"symfony/cache": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
40+
"symfony/dom-crawler": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
41+
"symfony/framework-bundle": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
42+
"symfony/http-client": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
43+
"symfony/messenger": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
4444
"symfony/monolog-bundle": "^3.4",
45-
"symfony/phpunit-bridge": "^5.2.6||^6.0||^7.0",
46-
"symfony/process": "^4.4.20||^5.0.11||^6.0||^7.0",
47-
"symfony/security-core": "^4.4.20||^5.0.11||^6.0||^7.0",
48-
"symfony/security-http": "^4.4.20||^5.0.11||^6.0||^7.0",
49-
"symfony/twig-bundle": "^4.4.20||^5.0.11||^6.0||^7.0",
50-
"symfony/yaml": "^4.4.20||^5.0.11||^6.0||^7.0",
45+
"symfony/phpunit-bridge": "^5.2.6||^6.0||^7.0||^8.0",
46+
"symfony/process": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
47+
"symfony/security-core": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
48+
"symfony/security-http": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
49+
"symfony/twig-bundle": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
50+
"symfony/yaml": "^4.4.20||^5.0.11||^6.0||^7.0||^8.0",
5151
"vimeo/psalm": "^4.3||^5.16.0"
5252
},
5353
"suggest": {

src/Resources/config/schema/sentry-1.0.xsd

Lines changed: 0 additions & 144 deletions
This file was deleted.

src/Resources/config/services.php

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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

Comments
 (0)