composer update
This commit is contained in:
parent
f6abc3dce2
commit
71dfaca858
1753 changed files with 45274 additions and 14619 deletions
|
@ -380,12 +380,25 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
|||
if ($controller instanceof \Closure) {
|
||||
$r = new \ReflectionFunction($controller);
|
||||
|
||||
return array(
|
||||
$controller = array(
|
||||
'class' => $r->getName(),
|
||||
'method' => null,
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getStartLine(),
|
||||
);
|
||||
|
||||
if (false !== strpos($r->name, '{closure}')) {
|
||||
return $controller;
|
||||
}
|
||||
$controller['method'] = $r->name;
|
||||
|
||||
if ($class = $r->getClosureScopeClass()) {
|
||||
$controller['class'] = $class->name;
|
||||
} else {
|
||||
return $r->name;
|
||||
}
|
||||
|
||||
return $controller;
|
||||
}
|
||||
|
||||
if (\is_object($controller)) {
|
||||
|
|
|
@ -63,7 +63,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface
|
|||
* @param array $patterns The class patterns to expand
|
||||
* @param array $classes The existing classes to match against the patterns
|
||||
*
|
||||
* @return array A list of classes derivated from the patterns
|
||||
* @return array A list of classes derived from the patterns
|
||||
*/
|
||||
private function expandClasses(array $patterns, array $classes)
|
||||
{
|
||||
|
|
|
@ -112,7 +112,7 @@ class ExceptionListener implements EventSubscriberInterface
|
|||
* @param \Exception $exception The thrown exception
|
||||
* @param Request $request The original request
|
||||
*
|
||||
* @return Request $request The cloned request
|
||||
* @return Request The cloned request
|
||||
*/
|
||||
protected function duplicateRequest(\Exception $exception, Request $request)
|
||||
{
|
||||
|
|
|
@ -93,7 +93,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
/**
|
||||
* Gets the current store.
|
||||
*
|
||||
* @return StoreInterface $store A StoreInterface instance
|
||||
* @return StoreInterface A StoreInterface instance
|
||||
*/
|
||||
public function getStore()
|
||||
{
|
||||
|
|
3
vendor/symfony/http-kernel/HttpKernel.php
vendored
3
vendor/symfony/http-kernel/HttpKernel.php
vendored
|
@ -263,6 +263,9 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a human-readable string for the specified variable.
|
||||
*/
|
||||
private function varToString($var)
|
||||
{
|
||||
if (\is_object($var)) {
|
||||
|
|
11
vendor/symfony/http-kernel/Kernel.php
vendored
11
vendor/symfony/http-kernel/Kernel.php
vendored
|
@ -67,11 +67,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||
private $requestStackSize = 0;
|
||||
private $resetServices = false;
|
||||
|
||||
const VERSION = '3.4.18';
|
||||
const VERSION_ID = 30418;
|
||||
const VERSION = '3.4.21';
|
||||
const VERSION_ID = 30421;
|
||||
const MAJOR_VERSION = 3;
|
||||
const MINOR_VERSION = 4;
|
||||
const RELEASE_VERSION = 18;
|
||||
const RELEASE_VERSION = 21;
|
||||
const EXTRA_VERSION = '';
|
||||
|
||||
const END_OF_MAINTENANCE = '11/2020';
|
||||
|
@ -862,7 +862,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
|||
$fs->dumpFile($dir.$file, $code);
|
||||
@chmod($dir.$file, 0666 & ~umask());
|
||||
}
|
||||
@unlink(\dirname($dir.$file).'.legacy');
|
||||
$legacyFile = \dirname($dir.$file).'.legacy';
|
||||
if (file_exists($legacyFile)) {
|
||||
@unlink($legacyFile);
|
||||
}
|
||||
|
||||
$cache->write($rootCode, $container->getResources());
|
||||
}
|
||||
|
|
2
vendor/symfony/http-kernel/LICENSE
vendored
2
vendor/symfony/http-kernel/LICENSE
vendored
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2004-2018 Fabien Potencier
|
||||
Copyright (c) 2004-2019 Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -125,11 +125,8 @@ EOTXT;
|
|||
$collector->dump($data);
|
||||
$line = __LINE__ - 1;
|
||||
$output = preg_replace("/\033\[[^m]*m/", '', ob_get_clean());
|
||||
if (\PHP_VERSION_ID >= 50400) {
|
||||
$this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output);
|
||||
} else {
|
||||
$this->assertSame("\"DumpDataCollectorTest.php on line {$line}:\"\n456\n", $output);
|
||||
}
|
||||
|
||||
$this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output);
|
||||
|
||||
ob_start();
|
||||
$collector->__destruct();
|
||||
|
|
|
@ -47,7 +47,7 @@ class TranslatorListenerTest extends TestCase
|
|||
$this->translator
|
||||
->expects($this->at(0))
|
||||
->method('setLocale')
|
||||
->will($this->throwException(new \InvalidArgumentException()));
|
||||
->willThrowException(new \InvalidArgumentException());
|
||||
$this->translator
|
||||
->expects($this->at(1))
|
||||
->method('setLocale')
|
||||
|
@ -84,7 +84,7 @@ class TranslatorListenerTest extends TestCase
|
|||
$this->translator
|
||||
->expects($this->at(0))
|
||||
->method('setLocale')
|
||||
->will($this->throwException(new \InvalidArgumentException()));
|
||||
->willThrowException(new \InvalidArgumentException());
|
||||
$this->translator
|
||||
->expects($this->at(1))
|
||||
->method('setLocale')
|
||||
|
|
|
@ -72,7 +72,7 @@ class EsiFragmentRendererTest extends TestCase
|
|||
$altReference = new ControllerReference('alt_controller', array(), array());
|
||||
|
||||
$this->assertEquals(
|
||||
'<esi:include src="/_fragment?_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller&_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D" alt="/_fragment?_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dalt_controller&_hash=iPJEdRoUpGrM1ztqByiorpfMPtiW%2FOWwdH1DBUXHhEc%3D" />',
|
||||
'<esi:include src="/_fragment?_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" alt="/_fragment?_hash=iPJEdRoUpGrM1ztqByiorpfMPtiW%2FOWwdH1DBUXHhEc%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dalt_controller" />',
|
||||
$strategy->render($reference, $request, array('alt' => $altReference))->getContent()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class HIncludeFragmentRendererTest extends TestCase
|
|||
{
|
||||
$strategy = new HIncludeFragmentRenderer(null, new UriSigner('foo'));
|
||||
|
||||
$this->assertEquals('<hx:include src="/_fragment?_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller&_hash=BP%2BOzCD5MRUI%2BHJpgPDOmoju00FnzLhP3TGcSHbbBLs%3D"></hx:include>', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent());
|
||||
$this->assertEquals('<hx:include src="/_fragment?_hash=BP%2BOzCD5MRUI%2BHJpgPDOmoju00FnzLhP3TGcSHbbBLs%3D&_path=_format%3Dhtml%26_locale%3Den%26_controller%3Dmain_controller"></hx:include>', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent());
|
||||
}
|
||||
|
||||
public function testRenderWithUri()
|
||||
|
@ -80,7 +80,7 @@ class HIncludeFragmentRendererTest extends TestCase
|
|||
$engine->expects($this->once())
|
||||
->method('exists')
|
||||
->with('default')
|
||||
->will($this->throwException(new \InvalidArgumentException()));
|
||||
->willThrowException(new \InvalidArgumentException());
|
||||
|
||||
// only default
|
||||
$strategy = new HIncludeFragmentRenderer($engine);
|
||||
|
@ -93,7 +93,7 @@ class HIncludeFragmentRendererTest extends TestCase
|
|||
$engine->expects($this->once())
|
||||
->method('exists')
|
||||
->with('loading...')
|
||||
->will($this->throwException(new \RuntimeException()));
|
||||
->willThrowException(new \RuntimeException());
|
||||
|
||||
// only default
|
||||
$strategy = new HIncludeFragmentRenderer($engine);
|
||||
|
|
|
@ -51,7 +51,7 @@ class SsiFragmentRendererTest extends TestCase
|
|||
$altReference = new ControllerReference('alt_controller', array(), array());
|
||||
|
||||
$this->assertEquals(
|
||||
'<!--#include virtual="/_fragment?_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller&_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D" -->',
|
||||
'<!--#include virtual="/_fragment?_hash=Jz1P8NErmhKTeI6onI1EdAXTB85359MY3RIk5mSJ60w%3D&_path=_format%3Dhtml%26_locale%3Dfr%26_controller%3Dmain_controller" -->',
|
||||
$strategy->render($reference, $request, array('alt' => $altReference))->getContent()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -200,7 +200,7 @@ class HttpKernelTest extends TestCase
|
|||
public function testHandleWhenTheControllerIsAnObjectWithInvoke()
|
||||
{
|
||||
$dispatcher = new EventDispatcher();
|
||||
$kernel = $this->getHttpKernel($dispatcher, new Controller());
|
||||
$kernel = $this->getHttpKernel($dispatcher, new TestController());
|
||||
|
||||
$this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request()));
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ class HttpKernelTest extends TestCase
|
|||
public function testHandleWhenTheControllerIsAnArray()
|
||||
{
|
||||
$dispatcher = new EventDispatcher();
|
||||
$kernel = $this->getHttpKernel($dispatcher, array(new Controller(), 'controller'));
|
||||
$kernel = $this->getHttpKernel($dispatcher, array(new TestController(), 'controller'));
|
||||
|
||||
$this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request()));
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ class HttpKernelTest extends TestCase
|
|||
public function testHandleWhenTheControllerIsAStaticArray()
|
||||
{
|
||||
$dispatcher = new EventDispatcher();
|
||||
$kernel = $this->getHttpKernel($dispatcher, array('Symfony\Component\HttpKernel\Tests\Controller', 'staticcontroller'));
|
||||
$kernel = $this->getHttpKernel($dispatcher, array('Symfony\Component\HttpKernel\Tests\TestController', 'staticcontroller'));
|
||||
|
||||
$this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request()));
|
||||
}
|
||||
|
@ -381,7 +381,7 @@ class HttpKernelTest extends TestCase
|
|||
}
|
||||
}
|
||||
|
||||
class Controller
|
||||
class TestController
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
|
|
|
@ -21,7 +21,8 @@ class UriSignerTest extends TestCase
|
|||
$signer = new UriSigner('foobar');
|
||||
|
||||
$this->assertContains('?_hash=', $signer->sign('http://example.com/foo'));
|
||||
$this->assertContains('&_hash=', $signer->sign('http://example.com/foo?foo=bar'));
|
||||
$this->assertContains('?_hash=', $signer->sign('http://example.com/foo?foo=bar'));
|
||||
$this->assertContains('&foo=', $signer->sign('http://example.com/foo?foo=bar'));
|
||||
}
|
||||
|
||||
public function testCheck()
|
||||
|
@ -45,7 +46,7 @@ class UriSignerTest extends TestCase
|
|||
$signer = new UriSigner('foobar');
|
||||
|
||||
$this->assertSame(
|
||||
'http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D',
|
||||
'http://example.com/foo?_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D&baz=bay&foo=bar',
|
||||
$signer->sign('http://example.com/foo?foo=bar&baz=bay')
|
||||
);
|
||||
$this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
|
||||
|
@ -61,4 +62,15 @@ class UriSignerTest extends TestCase
|
|||
);
|
||||
$this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay')));
|
||||
}
|
||||
|
||||
public function testSignerWorksWithFragments()
|
||||
{
|
||||
$signer = new UriSigner('foobar');
|
||||
|
||||
$this->assertSame(
|
||||
'http://example.com/foo?_hash=EhpAUyEobiM3QTrKxoLOtQq5IsWyWedoXDPqIjzNj5o%3D&bar=foo&foo=bar#foobar',
|
||||
$signer->sign('http://example.com/foo?bar=foo&foo=bar#foobar')
|
||||
);
|
||||
$this->assertTrue($signer->check($signer->sign('http://example.com/foo?bar=foo&foo=bar#foobar')));
|
||||
}
|
||||
}
|
||||
|
|
7
vendor/symfony/http-kernel/UriSigner.php
vendored
7
vendor/symfony/http-kernel/UriSigner.php
vendored
|
@ -51,8 +51,9 @@ class UriSigner
|
|||
}
|
||||
|
||||
$uri = $this->buildUrl($url, $params);
|
||||
$params[$this->parameter] = $this->computeHash($uri);
|
||||
|
||||
return $uri.(false === strpos($uri, '?') ? '?' : '&').$this->parameter.'='.$this->computeHash($uri);
|
||||
return $this->buildUrl($url, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -75,7 +76,7 @@ class UriSigner
|
|||
return false;
|
||||
}
|
||||
|
||||
$hash = urlencode($params[$this->parameter]);
|
||||
$hash = $params[$this->parameter];
|
||||
unset($params[$this->parameter]);
|
||||
|
||||
return $this->computeHash($this->buildUrl($url, $params)) === $hash;
|
||||
|
@ -83,7 +84,7 @@ class UriSigner
|
|||
|
||||
private function computeHash($uri)
|
||||
{
|
||||
return urlencode(base64_encode(hash_hmac('sha256', $uri, $this->secret, true)));
|
||||
return base64_encode(hash_hmac('sha256', $uri, $this->secret, true));
|
||||
}
|
||||
|
||||
private function buildUrl(array $url, array $params = array())
|
||||
|
|
2
vendor/symfony/http-kernel/phpunit.xml.dist
vendored
2
vendor/symfony/http-kernel/phpunit.xml.dist
vendored
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
|
|
Reference in a new issue