Understand service changes and event handling in 3.x
masterThe bundle's service architecture has been updated to follow Symfony best practices:
- Private Services: All services are now private. Use public aliases if you need to access them directly. Alternatively, use Sentry SDK global functions for manual message capture.
- Listener Changes: The
ExceptionListeneris replaced byErrorListener,RequestListener,SubRequestListener, andConsoleListener. These listeners arefinal; to override behavior, you must append your own listeners. - Listener Priority: Listeners are registered with a priority of
1, allowing custom listeners with priority0to run after them and modify theScope. - Dropped Events:
SentrySymfonyEvents::PRE_CAPTUREandSentrySymfonyEvents::SET_USER_CONTEXThave been removed. To inject data into events, implement a custom listener (similar toRequestListener) that interacts with theHubandScope.