File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change 11# Change log
22
3+ ## 1.5.1 - 2020-08-24
4+ ### Fixed
5+ * Fix double sending of events to Sentry.
6+ * Fix event exclusion ("except" parameter).
7+
38## 1.5.0 - 2020-07-07
491.5.0 released
510
Original file line number Diff line number Diff line change 66
77namespace notamedia \sentry ;
88
9+ use Sentry \ClientBuilder ;
10+ use Sentry \Integration \ErrorListenerIntegration ;
11+ use Sentry \Integration \ExceptionListenerIntegration ;
12+ use Sentry \Integration \FatalErrorListenerIntegration ;
13+ use Sentry \Integration \IntegrationInterface ;
14+ use Sentry \SentrySdk ;
915use Sentry \Severity ;
1016use Sentry \State \Scope ;
1117use Throwable ;
@@ -47,7 +53,28 @@ public function __construct($config = [])
4753 {
4854 parent ::__construct ($ config );
4955
50- \Sentry \init (array_merge (['dsn ' => $ this ->dsn ], $ this ->clientOptions ));
56+ $ userOptions = array_merge (['dsn ' => $ this ->dsn ], $ this ->clientOptions );
57+ $ builder = ClientBuilder::create ($ userOptions );
58+
59+ $ options = $ builder ->getOptions ();
60+ $ options ->setIntegrations (static function (array $ integrations ) {
61+ // Remove the default error and fatal exception listeners to let us handle those
62+ return array_filter ($ integrations , static function (IntegrationInterface $ integration ): bool {
63+ if ($ integration instanceof ErrorListenerIntegration) {
64+ return false ;
65+ }
66+ if ($ integration instanceof ExceptionListenerIntegration) {
67+ return false ;
68+ }
69+ if ($ integration instanceof FatalErrorListenerIntegration) {
70+ return false ;
71+ }
72+
73+ return true ;
74+ });
75+ });
76+
77+ SentrySdk::init ()->bindClient ($ builder ->getClient ());
5178 }
5279
5380 /**
You can’t perform that action at this time.
0 commit comments