mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 05:29:53 +09:00
Update composer dependencies
This commit is contained in:
@@ -20,8 +20,10 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
* Formats debug file links.
|
||||
*
|
||||
* @author Jérémy Romey <jeremy@free-agent.fr>
|
||||
*
|
||||
* @final since Symfony 4.3
|
||||
*/
|
||||
class FileLinkFormatter implements \Serializable
|
||||
class FileLinkFormatter
|
||||
{
|
||||
private $fileLinkFormat;
|
||||
private $requestStack;
|
||||
@@ -36,7 +38,7 @@ class FileLinkFormatter implements \Serializable
|
||||
$fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
|
||||
if ($fileLinkFormat && !\is_array($fileLinkFormat)) {
|
||||
$i = strpos($f = $fileLinkFormat, '&', max(strrpos($f, '%f'), strrpos($f, '%l'))) ?: \strlen($f);
|
||||
$fileLinkFormat = array(substr($f, 0, $i)) + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$fileLinkFormat = [substr($f, 0, $i)] + preg_split('/&([^>]++)>/', substr($f, $i), -1, PREG_SPLIT_DELIM_CAPTURE);
|
||||
}
|
||||
|
||||
$this->fileLinkFormat = $fileLinkFormat;
|
||||
@@ -55,20 +57,20 @@ class FileLinkFormatter implements \Serializable
|
||||
}
|
||||
}
|
||||
|
||||
return strtr($fmt[0], array('%f' => $file, '%l' => $line));
|
||||
return strtr($fmt[0], ['%f' => $file, '%l' => $line]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function serialize()
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __sleep(): array
|
||||
{
|
||||
return serialize($this->getFileLinkFormat());
|
||||
}
|
||||
$this->fileLinkFormat = $this->getFileLinkFormat();
|
||||
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
$this->fileLinkFormat = unserialize($serialized, array('allowed_classes' => false));
|
||||
return ['fileLinkFormat'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,17 +90,15 @@ class FileLinkFormatter implements \Serializable
|
||||
if ($this->fileLinkFormat) {
|
||||
return $this->fileLinkFormat;
|
||||
}
|
||||
|
||||
if ($this->requestStack && $this->baseDir && $this->urlFormat) {
|
||||
$request = $this->requestStack->getMasterRequest();
|
||||
if ($request instanceof Request) {
|
||||
if ($this->urlFormat instanceof \Closure && !$this->urlFormat = ($this->urlFormat)()) {
|
||||
return;
|
||||
}
|
||||
|
||||
return array(
|
||||
if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) {
|
||||
return [
|
||||
$request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat,
|
||||
$this->baseDir.\DIRECTORY_SEPARATOR, '',
|
||||
);
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\HttpKernel\Debug;
|
||||
|
||||
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher as BaseTraceableEventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
|
||||
/**
|
||||
@@ -27,7 +26,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function preDispatch($eventName, Event $event)
|
||||
protected function beforeDispatch(string $eventName, $event)
|
||||
{
|
||||
switch ($eventName) {
|
||||
case KernelEvents::REQUEST:
|
||||
@@ -58,7 +57,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function postDispatch($eventName, Event $event)
|
||||
protected function afterDispatch(string $eventName, $event)
|
||||
{
|
||||
switch ($eventName) {
|
||||
case KernelEvents::CONTROLLER_ARGUMENTS:
|
||||
|
||||
Reference in New Issue
Block a user