Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
33
vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php
vendored
Normal file
33
vendor/symfony/http-kernel/DataCollector/AjaxDataCollector.php
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
/**
|
||||
* AjaxDataCollector.
|
||||
*
|
||||
* @author Bart van den Burg <bart@burgov.nl>
|
||||
*/
|
||||
class AjaxDataCollector extends DataCollector
|
||||
{
|
||||
public function collect(Request $request, Response $response, \Exception $exception = null)
|
||||
{
|
||||
// all collecting is done client side
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return 'ajax';
|
||||
}
|
||||
}
|
|
@ -75,7 +75,7 @@ class ConfigDataCollector extends DataCollector
|
|||
'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'),
|
||||
'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'),
|
||||
'bundles' => array(),
|
||||
'sapi_name' => php_sapi_name(),
|
||||
'sapi_name' => PHP_SAPI,
|
||||
);
|
||||
|
||||
if (isset($this->kernel)) {
|
||||
|
|
|
@ -22,6 +22,24 @@ use Symfony\Component\HttpKernel\Log\DebugLoggerInterface;
|
|||
*/
|
||||
class LoggerDataCollector extends DataCollector implements LateDataCollectorInterface
|
||||
{
|
||||
private $errorNames = array(
|
||||
E_DEPRECATED => 'E_DEPRECATED',
|
||||
E_USER_DEPRECATED => 'E_USER_DEPRECATED',
|
||||
E_NOTICE => 'E_NOTICE',
|
||||
E_USER_NOTICE => 'E_USER_NOTICE',
|
||||
E_STRICT => 'E_STRICT',
|
||||
E_WARNING => 'E_WARNING',
|
||||
E_USER_WARNING => 'E_USER_WARNING',
|
||||
E_COMPILE_WARNING => 'E_COMPILE_WARNING',
|
||||
E_CORE_WARNING => 'E_CORE_WARNING',
|
||||
E_USER_ERROR => 'E_USER_ERROR',
|
||||
E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR',
|
||||
E_COMPILE_ERROR => 'E_COMPILE_ERROR',
|
||||
E_PARSE => 'E_PARSE',
|
||||
E_ERROR => 'E_ERROR',
|
||||
E_CORE_ERROR => 'E_CORE_ERROR',
|
||||
);
|
||||
|
||||
private $logger;
|
||||
|
||||
public function __construct($logger = null)
|
||||
|
@ -106,6 +124,9 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
|
|||
if (isset($context['type'], $context['file'], $context['line'], $context['level'])) {
|
||||
$errorId = md5("{$context['type']}/{$context['line']}/{$context['file']}\x00{$log['message']}", true);
|
||||
$silenced = !($context['type'] & $context['level']);
|
||||
if (isset($this->errorNames[$context['type']])) {
|
||||
$context = array_merge(array('name' => $this->errorNames[$context['type']]), $context);
|
||||
}
|
||||
|
||||
if (isset($errorContextById[$errorId])) {
|
||||
if (isset($errorContextById[$errorId]['errorCount'])) {
|
||||
|
|
|
@ -35,6 +35,10 @@ class ValueExporter
|
|||
return sprintf('Object(%s)', get_class($value));
|
||||
}
|
||||
|
||||
if ($value instanceof \__PHP_Incomplete_Class) {
|
||||
return sprintf('__PHP_Incomplete_Class(%s)', $this->getClassNameFromIncomplete($value));
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
if (empty($value)) {
|
||||
return '[]';
|
||||
|
@ -75,4 +79,11 @@ class ValueExporter
|
|||
|
||||
return (string) $value;
|
||||
}
|
||||
|
||||
private function getClassNameFromIncomplete(\__PHP_Incomplete_Class $value)
|
||||
{
|
||||
$array = new \ArrayObject($value);
|
||||
|
||||
return $array['__PHP_Incomplete_Class_Name'];
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue