removal of unnecessary file, and composer update
This commit is contained in:
@@ -91,7 +91,7 @@ class FileLinkFormatter implements \Serializable
|
||||
if ($this->requestStack && $this->baseDir && $this->urlFormat) {
|
||||
$request = $this->requestStack->getMasterRequest();
|
||||
if ($request instanceof Request) {
|
||||
if ($this->urlFormat instanceof \Closure && !$this->urlFormat = \call_user_func($this->urlFormat)) {
|
||||
if ($this->urlFormat instanceof \Closure && !$this->urlFormat = ($this->urlFormat)()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,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)
|
||||
{
|
||||
|
||||
11
vendor/symfony/http-kernel/Kernel.php
vendored
11
vendor/symfony/http-kernel/Kernel.php
vendored
@@ -73,11 +73,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
||||
private $requestStackSize = 0;
|
||||
private $resetServices = false;
|
||||
|
||||
const VERSION = '4.2.1';
|
||||
const VERSION_ID = 40201;
|
||||
const VERSION = '4.2.2';
|
||||
const VERSION_ID = 40202;
|
||||
const MAJOR_VERSION = 4;
|
||||
const MINOR_VERSION = 2;
|
||||
const RELEASE_VERSION = 1;
|
||||
const RELEASE_VERSION = 2;
|
||||
const EXTRA_VERSION = '';
|
||||
|
||||
const END_OF_MAINTENANCE = '07/2019';
|
||||
@@ -743,7 +743,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
|
||||
|
||||
@@ -144,11 +144,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();
|
||||
|
||||
@@ -48,7 +48,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')
|
||||
@@ -85,7 +85,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')
|
||||
|
||||
@@ -60,7 +60,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()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,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()));
|
||||
}
|
||||
@@ -199,7 +199,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()));
|
||||
}
|
||||
@@ -207,7 +207,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()));
|
||||
}
|
||||
@@ -372,7 +372,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())
|
||||
|
||||
Reference in New Issue
Block a user