Update composer dependencies

This commit is contained in:
Chris
2019-06-11 12:29:32 +01:00
parent 7d6df3843b
commit 1f608b1c21
1835 changed files with 74500 additions and 27482 deletions

View File

@@ -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, '',
);
];
}
}
}

View File

@@ -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: