Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -25,6 +25,9 @@ use Symfony\Component\HttpFoundation\Response;
* Client simulates a browser and makes requests to a Kernel object.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @method Request|null getRequest() A Request instance
* @method Response|null getResponse() A Response instance
*/
class Client extends BaseClient
{
@ -47,26 +50,6 @@ class Client extends BaseClient
parent::__construct($server, $history, $cookieJar);
}
/**
* {@inheritdoc}
*
* @return Request|null A Request instance
*/
public function getRequest()
{
return parent::getRequest();
}
/**
* {@inheritdoc}
*
* @return Response|null A Response instance
*/
public function getResponse()
{
return parent::getResponse();
}
/**
* Makes a request.
*

View file

@ -298,7 +298,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
{
$html = '';
$dumper = new HtmlDumper(function ($line) use (&$html) {$html .= $line;}, $this->charset);
$dumper = new HtmlDumper(function ($line) use (&$html) { $html .= $line; }, $this->charset);
$dumper->setDumpHeader('');
$dumper->setDumpBoundaries('', '');

View file

@ -33,7 +33,7 @@ class ValueExporter
if (is_object($value)) {
if ($value instanceof \DateTime || $value instanceof \DateTimeInterface) {
return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ISO8601));
return sprintf('Object(%s) - %s', get_class($value), $value->format(\DateTime::ATOM));
}
return sprintf('Object(%s)', get_class($value));

View file

@ -52,6 +52,6 @@ class AddRequestFormatsListener implements EventSubscriberInterface
*/
public static function getSubscribedEvents()
{
return array(KernelEvents::REQUEST => 'onKernelRequest');
return array(KernelEvents::REQUEST => array('onKernelRequest', 1));
}
}

View file

@ -11,6 +11,7 @@
namespace Symfony\Component\HttpKernel\EventListener;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

View file

@ -12,6 +12,7 @@
namespace Symfony\Component\HttpKernel\EventListener;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;

View file

@ -314,6 +314,26 @@ class Store implements StoreInterface
return unserialize($entries);
}
/**
* Purges data for the given URL.
*
* This method purges both the HTTP and the HTTPS version of the cache entry.
*
* @param string $url A URL
*
* @return bool true if the URL exists with either HTTP or HTTPS scheme and has been purged, false otherwise
*/
public function purge($url)
{
$http = preg_replace('#^https:#', 'http:', $url);
$https = preg_replace('#^http:#', 'https:', $url);
$purgedHttp = $this->doPurge($http);
$purgedHttps = $this->doPurge($https);
return $purgedHttp || $purgedHttps;
}
/**
* Purges data for the given URL.
*
@ -321,10 +341,9 @@ class Store implements StoreInterface
*
* @return bool true if the URL exists and has been purged, false otherwise
*/
public function purge($url)
private function doPurge($url)
{
$key = $this->getCacheKey(Request::create($url));
if (isset($this->locks[$key])) {
flock($this->locks[$key], LOCK_UN);
fclose($this->locks[$key]);

View file

@ -59,11 +59,11 @@ abstract class Kernel implements KernelInterface, TerminableInterface
protected $startTime;
protected $loadClassCache;
const VERSION = '2.8.16';
const VERSION_ID = 20816;
const VERSION = '2.8.19';
const VERSION_ID = 20819;
const MAJOR_VERSION = 2;
const MINOR_VERSION = 8;
const RELEASE_VERSION = 16;
const RELEASE_VERSION = 19;
const EXTRA_VERSION = '';
const END_OF_MAINTENANCE = '11/2018';
@ -303,6 +303,9 @@ abstract class Kernel implements KernelInterface, TerminableInterface
{
if (null === $this->name) {
$this->name = preg_replace('/[^a-zA-Z0-9_]+/', '', basename($this->rootDir));
if (ctype_digit($this->name[0])) {
$this->name = '_'.$this->name;
}
}
return $this->name;

View file

@ -46,7 +46,7 @@ class MemcacheProfilerStorage extends BaseMemcacheProfilerStorage
$port = $matches[3];
$memcache = new \Memcache();
$memcache->addserver($host, $port);
$memcache->addServer($host, $port);
$this->memcache = $memcache;
}

View file

@ -17,9 +17,9 @@
],
"require": {
"php": ">=5.3.9",
"symfony/event-dispatcher": "~2.6,>=2.6.7|~3.0.0",
"symfony/event-dispatcher": "^2.6.7|~3.0.0",
"symfony/http-foundation": "~2.7.20|~2.8.13|~3.1.6",
"symfony/debug": "~2.6,>=2.6.2",
"symfony/debug": "^2.6.2",
"psr/log": "~1.0"
},
"require-dev": {
@ -27,16 +27,16 @@
"symfony/class-loader": "~2.1|~3.0.0",
"symfony/config": "~2.8",
"symfony/console": "~2.3|~3.0.0",
"symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
"symfony/css-selector": "^2.0.5|~3.0.0",
"symfony/dependency-injection": "~2.8|~3.0.0",
"symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0",
"symfony/dom-crawler": "^2.0.5|~3.0.0",
"symfony/expression-language": "~2.4|~3.0.0",
"symfony/finder": "~2.0,>=2.0.5|~3.0.0",
"symfony/process": "~2.0,>=2.0.5|~3.0.0",
"symfony/finder": "^2.0.5|~3.0.0",
"symfony/process": "^2.0.5|~3.0.0",
"symfony/routing": "~2.8|~3.0.0",
"symfony/stopwatch": "~2.3|~3.0.0",
"symfony/templating": "~2.2|~3.0.0",
"symfony/translation": "~2.0,>=2.0.5|~3.0.0",
"symfony/translation": "^2.0.5|~3.0.0",
"symfony/var-dumper": "~2.6|~3.0.0"
},
"conflict": {