diff --git a/CHANGELOG.md b/CHANGELOG.md
index 99f71046..97d0e3f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,7 @@
- [BC BREAK] Remove the `monolog` configuration option. Instead, register the service manually (#406)
- [BC BREAK] Remove the `listener_priorities` configuration option. Instead, use a compiler pass to change the priority of the listeners (#407)
- Prefer usage of the existing `Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface` service for the `RequestFetcher` class (#409)
+- [BC BREAK] Change the priorities of the `RequestListener` and `SubRequestListener` listeners (#414)
## 3.5.3 (2020-10-13)
diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md
index 2b49e501..39bf0070 100644
--- a/UPGRADE-4.0.md
+++ b/UPGRADE-4.0.md
@@ -77,6 +77,10 @@
- Changed the priority of the `ConsoleCommandListener::handleConsoleErrorEvent` listener to `-64`.
- Changed the priority of the `ConsoleCommandListener::::handleConsoleCommandEvent` listener to `128`.
- Changed the priority of the `MessengerListener::handleWorkerMessageFailedEvent` listener to `50`.
+- Changed the priority of the `RequestListener::handleKernelRequestEvent` listener to `5`.
+- Changed the priority of the `RequestListener::handleKernelControllerEvent` listener to `10`.
+- Changed the priority of the `SubRequestListener::handleKernelRequestEvent` listener to `3`.
+- Changed the priority of the `SubRequestListener::handleKernelFinishRequestEvent` listener to `5`.
- Changed the type of the `sentry.options.before_send` configuration option from `scalar` to `string`. The value must always be the name of the container service to call without the `@` prefix.
Before
diff --git a/src/Resources/config/services.xml b/src/Resources/config/services.xml
index 5205df63..1e2849d9 100644
--- a/src/Resources/config/services.xml
+++ b/src/Resources/config/services.xml
@@ -41,15 +41,15 @@
-
-
+
+
-
-
+
+
diff --git a/tests/DependencyInjection/SentryExtensionTest.php b/tests/DependencyInjection/SentryExtensionTest.php
index e86e4128..40403084 100644
--- a/tests/DependencyInjection/SentryExtensionTest.php
+++ b/tests/DependencyInjection/SentryExtensionTest.php
@@ -125,12 +125,12 @@ public function testRequestListener(): void
[
'event' => KernelEvents::REQUEST,
'method' => 'handleKernelRequestEvent',
- 'priority' => 1,
+ 'priority' => 5,
],
[
'event' => KernelEvents::CONTROLLER,
'method' => 'handleKernelControllerEvent',
- 'priority' => 1,
+ 'priority' => 10,
],
],
], $definition->getTags());
@@ -147,12 +147,12 @@ public function testSubRequestListener(): void
[
'event' => KernelEvents::REQUEST,
'method' => 'handleKernelRequestEvent',
- 'priority' => 1,
+ 'priority' => 3,
],
[
'event' => KernelEvents::FINISH_REQUEST,
'method' => 'handleKernelFinishRequestEvent',
- 'priority' => 1,
+ 'priority' => 5,
],
],
], $definition->getTags());