N°6934 - Symfony 6.4 - upgrade Symfony bundles to 6.4 (#580)

* Update Symfony lib to version ~6.4.0
* Update code missing return type
* Add an iTop general configuration entry to store application secret (Symfony mandatory parameter)
* Use dependency injection in ExceptionListener & UserProvider classes
This commit is contained in:
bdalsass
2023-12-05 13:56:56 +01:00
committed by GitHub
parent 863ab4560c
commit 27ce51ab07
1392 changed files with 44869 additions and 27799 deletions

View File

@@ -1,9 +1,10 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="<?= $this->charset; ?>" />
<meta name="robots" content="noindex,nofollow,noarchive" />
<meta charset="<?= $this->charset; ?>">
<meta name="robots" content="noindex,nofollow,noarchive">
<title>An Error Occurred: <?= $statusText; ?></title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>❌</text></svg>">
<style><?= $this->include('assets/css/error.css'); ?></style>
</head>
<body>

View File

@@ -13,7 +13,6 @@
</h2>
</div>
</div>
<div class="exception-message-wrapper">
<div class="container">
<h1 class="break-long-words exception-message<?= mb_strlen($exceptionMessage) > 180 ? ' long' : ''; ?>"><?= $this->formatFileFromText(nl2br($exceptionMessage)); ?></h1>
@@ -35,7 +34,7 @@
$last = $exceptionAsArrayCount - 1;
foreach ($exceptionAsArray as $i => $e) {
foreach ($e['trace'] as $trace) {
if ($trace['file'] && false === mb_strpos($trace['file'], '/vendor/') && false === mb_strpos($trace['file'], '/var/cache/') && $i < $last) {
if ($trace['file'] && !str_contains($trace['file'], '/vendor/') && !str_contains($trace['file'], '/var/cache/') && $i < $last) {
$exceptionWithUserCode[] = $i;
}
}

View File

@@ -2,9 +2,9 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="<?= $this->charset; ?>" />
<meta name="robots" content="noindex,nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta charset="<?= $this->charset; ?>">
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title><?= $_message; ?></title>
<link rel="icon" type="image/png" href="<?= $this->include('assets/images/favicon.png.base64'); ?>">
<style><?= $this->include('assets/css/exception.css'); ?></style>

View File

@@ -11,7 +11,7 @@
<?php if ($trace['file']) { ?>
<?php
$lineNumber = $trace['line'] ?: 1;
$fileLink = $this->getFileLink($trace['file'], $lineNumber);
$fileLink = $this->fileLinkFormat->format($trace['file'], $lineNumber);
$filePath = strtr(strip_tags($this->formatFile($trace['file'], $lineNumber)), [' at line '.$lineNumber => '']);
$filePathParts = explode(\DIRECTORY_SEPARATOR, $filePath);
?>

View File

@@ -12,7 +12,7 @@
$class = substr($exception['class'], $separator);
?>
<?php if ('' === $class) { ?>
</br>
<br>
<?php } else { ?>
<h3 class="trace-class">
<?php if ('' !== $namespace) { ?>
@@ -25,13 +25,21 @@
<p class="break-long-words trace-message"><?= $this->escape($exception['message']); ?></p>
<?php } ?>
</div>
<?php if (\count($exception['data'] ?? [])) { ?>
<details class="exception-properties-wrapper">
<summary>Show exception properties</summary>
<div class="exception-properties">
<?= $this->dumpValue($exception['data']) ?>
</div>
</details>
<?php } ?>
</div>
<div id="trace-html-<?= $index; ?>" class="sf-toggle-content">
<?php
$isFirstUserCode = true;
foreach ($exception['trace'] as $i => $trace) {
$isVendorTrace = $trace['file'] && (false !== mb_strpos($trace['file'], '/vendor/') || false !== mb_strpos($trace['file'], '/var/cache/'));
$isVendorTrace = $trace['file'] && (str_contains($trace['file'], '/vendor/') || str_contains($trace['file'], '/var/cache/'));
$displayCodeSnippet = $isFirstUserCode && !$isVendorTrace;
if ($displayCodeSnippet) {
$isFirstUserCode = false;