File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,20 @@ public static function getSubscribedEvents(): array
41
41
42
42
public function onKernelRequest (RequestEvent $ event ): void
43
43
{
44
- if ($ event ->isMasterRequest ()) {
45
- $ this ->httpRequest = $ event ->getRequest ();
46
- $ this ->timestampStart = microtime (true );
44
+ if (method_exists ($ event , 'isMainRequest ' )) { // Symfony >= 5.3
45
+ if ($ event ->isMainRequest ()) {
46
+ $ this ->httpRequest = $ event ->getRequest ();
47
+ $ this ->timestampStart = microtime (true );
48
+ }
49
+
50
+ return ;
51
+ }
52
+
53
+ if (method_exists ($ event , 'isMasterRequest ' )) { // Symfony < 5.3
54
+ if ($ event ->isMasterRequest ()) {
55
+ $ this ->httpRequest = $ event ->getRequest ();
56
+ $ this ->timestampStart = microtime (true );
57
+ }
47
58
}
48
59
}
49
60
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ public static function createTreblle(
25
25
ErrorDataProvider $ errorDataProvider
26
26
): Treblle {
27
27
return new Treblle (
28
- $ configuration ->getEndpointUrl (),
29
28
$ configuration ->getApiKey (),
30
29
$ configuration ->getProjectId (),
31
30
$ client ,
Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ protected function setUp(): void
79
79
$ this ->dataProvider = new DataProvider (new PayloadAnonymizer ([]));
80
80
81
81
$ this ->treblle = new Treblle (
82
- 'http://127.0.0.1 ' ,
83
82
'my api key ' ,
84
83
'my project id ' ,
85
84
$ client ,
You can’t perform that action at this time.
0 commit comments