[HttpKernel] backport FC compat code
This commit is contained in:
parent
4f04bedd00
commit
4c401ebdd6
@ -54,8 +54,10 @@ class DoctrineDataCollector extends DataCollector
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @param \Throwable|null $exception
|
||||
*/
|
||||
public function collect(Request $request, Response $response, \Exception $exception = null)
|
||||
public function collect(Request $request, Response $response/*, \Throwable $exception = null*/)
|
||||
{
|
||||
$queries = [];
|
||||
foreach ($this->loggers as $name => $logger) {
|
||||
@ -119,7 +121,7 @@ class DoctrineDataCollector extends DataCollector
|
||||
return 'db';
|
||||
}
|
||||
|
||||
private function sanitizeQueries(string $connectionName, array $queries)
|
||||
private function sanitizeQueries(string $connectionName, array $queries): array
|
||||
{
|
||||
foreach ($queries as $i => $query) {
|
||||
$queries[$i] = $this->sanitizeQuery($connectionName, $query);
|
||||
@ -128,7 +130,7 @@ class DoctrineDataCollector extends DataCollector
|
||||
return $queries;
|
||||
}
|
||||
|
||||
private function sanitizeQuery(string $connectionName, $query)
|
||||
private function sanitizeQuery(string $connectionName, array $query): array
|
||||
{
|
||||
$query['explainable'] = true;
|
||||
if (null === $query['params']) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
"symfony/config": "^4.2",
|
||||
"symfony/dependency-injection": "~3.4|~4.0",
|
||||
"symfony/form": "~4.3",
|
||||
"symfony/http-kernel": "~3.4|~4.0",
|
||||
"symfony/http-kernel": "^4.3.7|~4.0",
|
||||
"symfony/messenger": "~4.3",
|
||||
"symfony/property-access": "~3.4|~4.0",
|
||||
"symfony/property-info": "~3.4|~4.0",
|
||||
@ -48,6 +48,7 @@
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
|
||||
"symfony/dependency-injection": "<3.4",
|
||||
"symfony/http-kernel": "<4.3.7",
|
||||
"symfony/form": "<4.3",
|
||||
"symfony/messenger": "<4.3"
|
||||
},
|
||||
|
@ -138,10 +138,14 @@ class Profiler implements ResetInterface
|
||||
/**
|
||||
* Collects data for the given Response.
|
||||
*
|
||||
* @param \Throwable|null $exception
|
||||
*
|
||||
* @return Profile|null A Profile instance or null if the profiler is disabled
|
||||
*/
|
||||
public function collect(Request $request, Response $response, \Exception $exception = null)
|
||||
public function collect(Request $request, Response $response/*, \Throwable $exception = null*/)
|
||||
{
|
||||
$exception = 2 < \func_num_args() ? func_get_arg(2) : null;
|
||||
|
||||
if (false === $this->enabled) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user