updated composer
This commit is contained in:
@@ -42,15 +42,22 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
*/
|
||||
public function collect(Request $request, Response $response, \Throwable $exception = null)
|
||||
{
|
||||
$eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE);
|
||||
$eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE);
|
||||
|
||||
$this->data = [
|
||||
'token' => $response->headers->get('X-Debug-Token'),
|
||||
'symfony_version' => Kernel::VERSION,
|
||||
'symfony_state' => 'unknown',
|
||||
'symfony_minor_version' => sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION),
|
||||
'symfony_lts' => 4 === Kernel::MINOR_VERSION,
|
||||
'symfony_state' => $this->determineSymfonyState(),
|
||||
'symfony_eom' => $eom->format('F Y'),
|
||||
'symfony_eol' => $eol->format('F Y'),
|
||||
'env' => isset($this->kernel) ? $this->kernel->getEnvironment() : 'n/a',
|
||||
'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a',
|
||||
'php_version' => \PHP_VERSION,
|
||||
'php_architecture' => \PHP_INT_SIZE * 8,
|
||||
'php_intl_locale' => class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
|
||||
'php_intl_locale' => class_exists(\Locale::class, false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a',
|
||||
'php_timezone' => date_default_timezone_get(),
|
||||
'xdebug_enabled' => \extension_loaded('xdebug'),
|
||||
'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), \FILTER_VALIDATE_BOOLEAN),
|
||||
@@ -63,14 +70,6 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
foreach ($this->kernel->getBundles() as $name => $bundle) {
|
||||
$this->data['bundles'][$name] = new ClassStub(\get_class($bundle));
|
||||
}
|
||||
|
||||
$this->data['symfony_state'] = $this->determineSymfonyState();
|
||||
$this->data['symfony_minor_version'] = sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION);
|
||||
$this->data['symfony_lts'] = 4 === Kernel::MINOR_VERSION;
|
||||
$eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE);
|
||||
$eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE);
|
||||
$this->data['symfony_eom'] = $eom->format('F Y');
|
||||
$this->data['symfony_eol'] = $eol->format('F Y');
|
||||
}
|
||||
|
||||
if (preg_match('~^(\d+(?:\.\d+)*)(.+)?$~', $this->data['php_version'], $matches) && isset($matches[2])) {
|
||||
@@ -180,7 +179,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
*/
|
||||
public function getPhpVersionExtra()
|
||||
{
|
||||
return isset($this->data['php_version_extra']) ? $this->data['php_version_extra'] : null;
|
||||
return $this->data['php_version_extra'] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,7 +219,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
/**
|
||||
* Returns true if the debug is enabled.
|
||||
*
|
||||
* @return bool true if debug is enabled, false otherwise
|
||||
* @return bool|string true if debug is enabled, false otherwise or a string if no kernel was set
|
||||
*/
|
||||
public function isDebug()
|
||||
{
|
||||
|
||||
@@ -178,8 +178,13 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||
$charset = array_pop($this->data);
|
||||
$fileLinkFormat = array_pop($this->data);
|
||||
$this->dataCount = \count($this->data);
|
||||
foreach ($this->data as $dump) {
|
||||
if (!\is_string($dump['name']) || !\is_string($dump['file']) || !\is_int($dump['line'])) {
|
||||
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
|
||||
}
|
||||
}
|
||||
|
||||
self::__construct($this->stopwatch, $fileLinkFormat, $charset);
|
||||
self::__construct($this->stopwatch, \is_string($fileLinkFormat) || $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : null, \is_string($charset) ? $charset : null);
|
||||
}
|
||||
|
||||
public function getDumpsCount(): int
|
||||
@@ -189,7 +194,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||
|
||||
public function getDumps($format, $maxDepthLimit = -1, $maxItemsPerDepth = -1): array
|
||||
{
|
||||
$data = fopen('php://memory', 'r+b');
|
||||
$data = fopen('php://memory', 'r+');
|
||||
|
||||
if ('html' === $format) {
|
||||
$dumper = new HtmlDumper($data, $this->charset);
|
||||
@@ -252,7 +257,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
|
||||
}
|
||||
}
|
||||
|
||||
private function doDump(DataDumperInterface $dumper, $data, string $name, string $file, int $line)
|
||||
private function doDump(DataDumperInterface $dumper, Data $data, string $name, string $file, int $line)
|
||||
{
|
||||
if ($dumper instanceof CliDumper) {
|
||||
$contextDumper = function ($name, $file, $line, $fmt) {
|
||||
|
||||
@@ -79,32 +79,32 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
|
||||
|
||||
public function getLogs()
|
||||
{
|
||||
return isset($this->data['logs']) ? $this->data['logs'] : [];
|
||||
return $this->data['logs'] ?? [];
|
||||
}
|
||||
|
||||
public function getPriorities()
|
||||
{
|
||||
return isset($this->data['priorities']) ? $this->data['priorities'] : [];
|
||||
return $this->data['priorities'] ?? [];
|
||||
}
|
||||
|
||||
public function countErrors()
|
||||
{
|
||||
return isset($this->data['error_count']) ? $this->data['error_count'] : 0;
|
||||
return $this->data['error_count'] ?? 0;
|
||||
}
|
||||
|
||||
public function countDeprecations()
|
||||
{
|
||||
return isset($this->data['deprecation_count']) ? $this->data['deprecation_count'] : 0;
|
||||
return $this->data['deprecation_count'] ?? 0;
|
||||
}
|
||||
|
||||
public function countWarnings()
|
||||
{
|
||||
return isset($this->data['warning_count']) ? $this->data['warning_count'] : 0;
|
||||
return $this->data['warning_count'] ?? 0;
|
||||
}
|
||||
|
||||
public function countScreams()
|
||||
{
|
||||
return isset($this->data['scream_count']) ? $this->data['scream_count'] : 0;
|
||||
return $this->data['scream_count'] ?? 0;
|
||||
}
|
||||
|
||||
public function getCompilerLogs()
|
||||
|
||||
@@ -91,7 +91,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
'method' => $request->getMethod(),
|
||||
'format' => $request->getRequestFormat(),
|
||||
'content_type' => $response->headers->get('Content-Type', 'text/html'),
|
||||
'status_text' => isset(Response::$statusTexts[$statusCode]) ? Response::$statusTexts[$statusCode] : '',
|
||||
'status_text' => Response::$statusTexts[$statusCode] ?? '',
|
||||
'status_code' => $statusCode,
|
||||
'request_query' => $request->query->all(),
|
||||
'request_request' => $request->request->all(),
|
||||
@@ -359,12 +359,12 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
*/
|
||||
public function getRedirect()
|
||||
{
|
||||
return isset($this->data['redirect']) ? $this->data['redirect'] : false;
|
||||
return $this->data['redirect'] ?? false;
|
||||
}
|
||||
|
||||
public function getForwardToken()
|
||||
{
|
||||
return isset($this->data['forward_token']) ? $this->data['forward_token'] : null;
|
||||
return $this->data['forward_token'] ?? null;
|
||||
}
|
||||
|
||||
public function onKernelController(ControllerEvent $event)
|
||||
|
||||
Reference in New Issue
Block a user