Core and composer updates

This commit is contained in:
Rob Davies 2017-07-03 16:47:07 +01:00
parent a82634bb98
commit 62cac30480
1118 changed files with 21770 additions and 6306 deletions

View file

@ -141,7 +141,7 @@ abstract class Bundle implements BundleInterface
/**
* Returns the bundle parent name.
*
* @return string The Bundle parent name it overrides or null if no parent
* @return string|null The Bundle parent name it overrides or null if no parent
*/
public function getParent()
{

View file

@ -20,6 +20,7 @@ use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Dumper\HtmlDumper;
use Symfony\Component\VarDumper\Dumper\DataDumperInterface;
use Twig\Template;
/**
* @author Nicolas Grekas <p@tchwork.com>
@ -71,7 +72,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
}
$trace = DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS;
if (PHP_VERSION_ID >= 50400) {
if (\PHP_VERSION_ID >= 50400) {
$trace = debug_backtrace($trace, 7);
} else {
$trace = debug_backtrace($trace);
@ -96,7 +97,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
$line = $trace[$i]['line'];
break;
} elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof \Twig_Template) {
} elseif (isset($trace[$i]['object']) && $trace[$i]['object'] instanceof Template) {
$template = $trace[$i]['object'];
$name = $template->getTemplateName();
$src = method_exists($template, 'getSourceContext') ? $template->getSourceContext()->getCode() : (method_exists($template, 'getSource') ? $template->getSource() : false);
@ -263,7 +264,7 @@ class DumpDataCollector extends DataCollector implements DataDumperInterface
private function doDump($data, $name, $file, $line)
{
if (PHP_VERSION_ID >= 50400 && $this->dumper instanceof CliDumper) {
if (\PHP_VERSION_ID >= 50400 && $this->dumper instanceof CliDumper) {
$contextDumper = function ($name, $file, $line, $fileLinkFormat) {
if ($this instanceof HtmlDumper) {
if ($file) {

View file

@ -16,6 +16,9 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Templating\EngineInterface;
use Symfony\Component\HttpKernel\Controller\ControllerReference;
use Symfony\Component\HttpKernel\UriSigner;
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Loader\ExistsLoaderInterface;
/**
* Implements the Hinclude rendering strategy.
@ -32,10 +35,10 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
/**
* Constructor.
*
* @param EngineInterface|\Twig_Environment $templating An EngineInterface or a \Twig_Environment instance
* @param UriSigner $signer A UriSigner instance
* @param string $globalDefaultTemplate The global default content (it can be a template name or the content)
* @param string $charset
* @param EngineInterface|Environment $templating An EngineInterface or a Twig instance
* @param UriSigner $signer A UriSigner instance
* @param string $globalDefaultTemplate The global default content (it can be a template name or the content)
* @param string $charset
*/
public function __construct($templating = null, UriSigner $signer = null, $globalDefaultTemplate = null, $charset = 'utf-8')
{
@ -48,14 +51,14 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
/**
* Sets the templating engine to use to render the default content.
*
* @param EngineInterface|\Twig_Environment|null $templating An EngineInterface or a \Twig_Environment instance
* @param EngineInterface|Environment|null $templating An EngineInterface or an Environment instance
*
* @throws \InvalidArgumentException
*/
public function setTemplating($templating)
{
if (null !== $templating && !$templating instanceof EngineInterface && !$templating instanceof \Twig_Environment) {
throw new \InvalidArgumentException('The hinclude rendering strategy needs an instance of \Twig_Environment or Symfony\Component\Templating\EngineInterface');
if (null !== $templating && !$templating instanceof EngineInterface && !$templating instanceof Environment) {
throw new \InvalidArgumentException('The hinclude rendering strategy needs an instance of Twig\Environment or Symfony\Component\Templating\EngineInterface');
}
$this->templating = $templating;
@ -107,7 +110,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
}
$renderedAttributes = '';
if (count($attributes) > 0) {
if (PHP_VERSION_ID >= 50400) {
if (\PHP_VERSION_ID >= 50400) {
$flags = ENT_QUOTES | ENT_SUBSTITUTE;
} else {
$flags = ENT_QUOTES;
@ -140,7 +143,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
}
$loader = $this->templating->getLoader();
if ($loader instanceof \Twig_ExistsLoaderInterface || method_exists($loader, 'exists')) {
if ($loader instanceof ExistsLoaderInterface || method_exists($loader, 'exists')) {
return $loader->exists($template);
}
@ -152,7 +155,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
}
return true;
} catch (\Twig_Error_Loader $e) {
} catch (LoaderError $e) {
}
return false;

View file

@ -59,11 +59,11 @@ abstract class Kernel implements KernelInterface, TerminableInterface
protected $startTime;
protected $loadClassCache;
const VERSION = '2.8.19';
const VERSION_ID = 20819;
const VERSION = '2.8.22';
const VERSION_ID = 20822;
const MAJOR_VERSION = 2;
const MINOR_VERSION = 8;
const RELEASE_VERSION = 19;
const RELEASE_VERSION = 22;
const EXTRA_VERSION = '';
const END_OF_MAINTENANCE = '11/2018';
@ -755,7 +755,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface
$output .= $rawChunk;
if (PHP_VERSION_ID >= 70000) {
if (\PHP_VERSION_ID >= 70000) {
// PHP 7 memory manager will not release after token_get_all(), see https://bugs.php.net/70098
unset($tokens, $rawChunk);
gc_mem_caches();

View file

@ -156,7 +156,7 @@ class Profile
/**
* Returns the time.
*
* @return string The time
* @return int The time
*/
public function getTime()
{
@ -167,6 +167,9 @@ class Profile
return $this->time;
}
/**
* @param int The time
*/
public function setTime($time)
{
$this->time = $time;

View file

@ -40,7 +40,8 @@
"symfony/var-dumper": "~2.6|~3.0.0"
},
"conflict": {
"symfony/config": "<2.7"
"symfony/config": "<2.7",
"twig/twig": "<1.34|<2.4,>=2"
},
"suggest": {
"symfony/browser-kit": "",

View file

@ -5,6 +5,8 @@
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />