composer update
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;
|
||||
@@ -64,17 +66,11 @@ class FileLinkFormatter implements \Serializable
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function serialize()
|
||||
public function __sleep(): array
|
||||
{
|
||||
return serialize($this->getFileLinkFormat());
|
||||
}
|
||||
$this->getFileLinkFormat();
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function unserialize($serialized)
|
||||
{
|
||||
$this->fileLinkFormat = unserialize($serialized, ['allowed_classes' => false]);
|
||||
return ['fileLinkFormat'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,21 +87,17 @@ class FileLinkFormatter implements \Serializable
|
||||
|
||||
private function getFileLinkFormat()
|
||||
{
|
||||
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 [
|
||||
if ($request instanceof Request && (!$this->urlFormat instanceof \Closure || $this->urlFormat = ($this->urlFormat)())) {
|
||||
$this->fileLinkFormat = [
|
||||
$request->getSchemeAndHttpHost().$request->getBasePath().$this->urlFormat,
|
||||
$this->baseDir.\DIRECTORY_SEPARATOR, '',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->fileLinkFormat;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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