Skip to content

Commit 41186d0

Browse files
[HttpKernel] backport FC compat code
1 parent 2c1397c commit 41186d0

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

DataCollector/DoctrineDataCollector.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ public function addLogger($name, DebugStack $logger)
5454

5555
/**
5656
* {@inheritdoc}
57+
*
58+
* @param \Throwable|null $exception
5759
*/
58-
public function collect(Request $request, Response $response, \Exception $exception = null)
60+
public function collect(Request $request, Response $response/*, \Throwable $exception = null*/)
5961
{
6062
$queries = [];
6163
foreach ($this->loggers as $name => $logger) {
@@ -119,7 +121,7 @@ public function getName()
119121
return 'db';
120122
}
121123

122-
private function sanitizeQueries(string $connectionName, array $queries)
124+
private function sanitizeQueries(string $connectionName, array $queries): array
123125
{
124126
foreach ($queries as $i => $query) {
125127
$queries[$i] = $this->sanitizeQuery($connectionName, $query);
@@ -128,7 +130,7 @@ private function sanitizeQueries(string $connectionName, array $queries)
128130
return $queries;
129131
}
130132

131-
private function sanitizeQuery(string $connectionName, $query)
133+
private function sanitizeQuery(string $connectionName, array $query): array
132134
{
133135
$query['explainable'] = true;
134136
if (null === $query['params']) {

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"symfony/config": "^4.2",
2929
"symfony/dependency-injection": "~3.4|~4.0",
3030
"symfony/form": "~4.3",
31-
"symfony/http-kernel": "~3.4|~4.0",
31+
"symfony/http-kernel": "^4.3.7|~4.0",
3232
"symfony/messenger": "~4.3",
3333
"symfony/property-access": "~3.4|~4.0",
3434
"symfony/property-info": "~3.4|~4.0",
@@ -48,6 +48,7 @@
4848
"conflict": {
4949
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
5050
"symfony/dependency-injection": "<3.4",
51+
"symfony/http-kernel": "<4.3.7",
5152
"symfony/form": "<4.3",
5253
"symfony/messenger": "<4.3"
5354
},

0 commit comments

Comments
 (0)