mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-17 04:13:46 +09:00
Updates to vendors etc
This commit is contained in:
@@ -23,12 +23,8 @@ use Symfony\Component\ErrorHandler\ErrorHandler;
|
||||
*/
|
||||
class ErrorHandlerConfigurator
|
||||
{
|
||||
private ?LoggerInterface $logger;
|
||||
private ?LoggerInterface $deprecationLogger;
|
||||
private array|int|null $levels;
|
||||
private ?int $throwAt;
|
||||
private bool $scream;
|
||||
private bool $scope;
|
||||
|
||||
/**
|
||||
* @param array|int|null $levels An array map of E_* to LogLevel::* or an integer bit field of E_* constants
|
||||
@@ -36,14 +32,16 @@ class ErrorHandlerConfigurator
|
||||
* @param bool $scream Enables/disables screaming mode, where even silenced errors are logged
|
||||
* @param bool $scope Enables/disables scoping mode
|
||||
*/
|
||||
public function __construct(?LoggerInterface $logger = null, array|int|null $levels = \E_ALL, ?int $throwAt = \E_ALL, bool $scream = true, bool $scope = true, ?LoggerInterface $deprecationLogger = null)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
public function __construct(
|
||||
private ?LoggerInterface $logger = null,
|
||||
array|int|null $levels = \E_ALL,
|
||||
?int $throwAt = \E_ALL,
|
||||
private bool $scream = true,
|
||||
private bool $scope = true,
|
||||
private ?LoggerInterface $deprecationLogger = null,
|
||||
) {
|
||||
$this->levels = $levels ?? \E_ALL;
|
||||
$this->throwAt = \is_int($throwAt) ? $throwAt : (null === $throwAt ? null : ($throwAt ? \E_ALL : null));
|
||||
$this->scream = $scream;
|
||||
$this->scope = $scope;
|
||||
$this->deprecationLogger = $deprecationLogger;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Debug;
|
||||
|
||||
use Symfony\Component\ErrorHandler\ErrorRenderer\FileLinkFormatter as ErrorHandlerFileLinkFormatter;
|
||||
|
||||
trigger_deprecation('symfony/http-kernel', '6.4', 'The "%s" class is deprecated, use "%s" instead.', FileLinkFormatter::class, ErrorHandlerFileLinkFormatter::class);
|
||||
|
||||
class_exists(ErrorHandlerFileLinkFormatter::class);
|
||||
|
||||
if (!class_exists(FileLinkFormatter::class, false)) {
|
||||
class_alias(ErrorHandlerFileLinkFormatter::class, FileLinkFormatter::class);
|
||||
}
|
||||
|
||||
if (false) {
|
||||
/**
|
||||
* @deprecated since Symfony 6.4, use FileLinkFormatter from the ErrorHandler component instead
|
||||
*/
|
||||
class FileLinkFormatter extends ErrorHandlerFileLinkFormatter
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -25,9 +25,12 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
|
||||
{
|
||||
protected function beforeDispatch(string $eventName, object $event): void
|
||||
{
|
||||
if ($this->disabled?->__invoke()) {
|
||||
return;
|
||||
}
|
||||
switch ($eventName) {
|
||||
case KernelEvents::REQUEST:
|
||||
$event->getRequest()->attributes->set('_stopwatch_token', substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6));
|
||||
$event->getRequest()->attributes->set('_stopwatch_token', bin2hex(random_bytes(3)));
|
||||
$this->stopwatch->openSection();
|
||||
break;
|
||||
case KernelEvents::VIEW:
|
||||
@@ -57,6 +60,9 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
|
||||
|
||||
protected function afterDispatch(string $eventName, object $event): void
|
||||
{
|
||||
if ($this->disabled?->__invoke()) {
|
||||
return;
|
||||
}
|
||||
switch ($eventName) {
|
||||
case KernelEvents::CONTROLLER_ARGUMENTS:
|
||||
$this->stopwatch->start('controller', 'section');
|
||||
@@ -66,7 +72,11 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
|
||||
if (null === $sectionId) {
|
||||
break;
|
||||
}
|
||||
$this->stopwatch->stopSection($sectionId);
|
||||
try {
|
||||
$this->stopwatch->stopSection($sectionId);
|
||||
} catch (\LogicException) {
|
||||
// The stop watch service might have been reset in the meantime
|
||||
}
|
||||
break;
|
||||
case KernelEvents::TERMINATE:
|
||||
// In the special case described in the `preDispatch` method above, the `$token` section
|
||||
|
||||
Reference in New Issue
Block a user