1414
1515class JaegerConnectionWrapper extends AbstractConnectionMiddleware
1616{
17- private TracerInterface $ tracer ;
18-
19- private ?int $ maxSqlLength ;
20-
21- public function __construct (Connection $ wrappedConnection , TracerInterface $ tracer , ?int $ maxSqlLength = null )
22- {
17+ public function __construct (
18+ Connection $ wrappedConnection ,
19+ private readonly TracerInterface $ tracer ,
20+ private readonly ?int $ maxSqlLength = null
21+ ) {
2322 parent ::__construct ($ wrappedConnection );
24-
25- $ this ->tracer = $ tracer ;
26- $ this ->maxSqlLength = $ maxSqlLength ;
2723 }
2824
2925 public function prepare (string $ sql ): Statement
@@ -89,13 +85,13 @@ public function exec(string $sql): int
8985 }
9086 }
9187
92- public function beginTransaction (): bool
88+ public function beginTransaction (): void
9389 {
9490 $ span = $ this ->tracer
9591 ->start ('dbal.transaction ' );
9692
9793 try {
98- return parent ::beginTransaction ();
94+ parent ::beginTransaction ();
9995 } catch (\Throwable $ t ) {
10096 $ span
10197 ->addTag (new DbalErrorCodeTag ($ t ->getCode ()))
@@ -107,13 +103,13 @@ public function beginTransaction(): bool
107103 }
108104 }
109105
110- public function commit (): bool
106+ public function commit (): void
111107 {
112108 $ span = $ this ->tracer
113109 ->start ('dbal.commit ' );
114110
115111 try {
116- return parent ::commit ();
112+ parent ::commit ();
117113 } catch (\Throwable $ t ) {
118114 $ span
119115 ->addTag (new DbalErrorCodeTag ($ t ->getCode ()))
@@ -125,13 +121,13 @@ public function commit(): bool
125121 }
126122 }
127123
128- public function rollBack (): bool
124+ public function rollBack (): void
129125 {
130126 $ span = $ this ->tracer
131127 ->start ('dbal.rollback ' );
132128
133129 try {
134- return parent ::rollBack ();
130+ parent ::rollBack ();
135131 } catch (\Throwable $ t ) {
136132 $ span
137133 ->addTag (new DbalErrorCodeTag ($ t ->getCode ()))
0 commit comments