File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 10
10
class TracingController
11
11
{
12
12
/**
13
- * @var Connection
13
+ * @var Connection|null
14
14
*/
15
15
private $ connection ;
16
16
17
- public function __construct (Connection $ connection )
17
+ public function __construct (Connection $ connection = null )
18
18
{
19
19
$ this ->connection = $ connection ;
20
20
}
21
21
22
22
public function pingDatabase (): Response
23
23
{
24
- $ this ->connection ->executeQuery ('SELECT 1 ' );
24
+ if ($ this ->connection ) {
25
+ $ this ->connection ->executeQuery ('SELECT 1 ' );
26
+ }
25
27
26
28
return new Response ('Success ' );
27
29
}
Original file line number Diff line number Diff line change 7
7
services :
8
8
Sentry\SentryBundle\Tests\End2End\App\Controller\TracingController :
9
9
arguments :
10
- - ' @doctrine.dbal.default_connection'
10
+ - ' @? doctrine.dbal.default_connection'
11
11
tags :
12
12
- controller.service_arguments
You can’t perform that action at this time.
0 commit comments