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:
Pantheon Automation 2016-04-20 09:56:34 -07:00 committed by Greg Anderson
parent b11a755ba8
commit c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions

View file

@ -52,9 +52,9 @@ class FragmentRendererPass implements CompilerPassInterface
throw new \InvalidArgumentException(sprintf('The service "%s" must not be abstract as fragment renderer are lazy-loaded.', $id));
}
$refClass = new \ReflectionClass($container->getParameterBag()->resolveValue($def->getClass()));
$class = $container->getParameterBag()->resolveValue($def->getClass());
$interface = 'Symfony\Component\HttpKernel\Fragment\FragmentRendererInterface';
if (!$refClass->implementsInterface($interface)) {
if (!is_subclass_of($class, $interface)) {
throw new \InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, $interface));
}

View file

@ -25,11 +25,30 @@ class LazyLoadingFragmentHandler extends FragmentHandler
private $container;
private $rendererIds = array();
public function __construct(ContainerInterface $container, $debug = false, RequestStack $requestStack = null)
/**
* Constructor.
*
* RequestStack will become required in 3.0.
*
* @param ContainerInterface $container A container
* @param RequestStack $requestStack The Request stack that controls the lifecycle of requests
* @param bool $debug Whether the debug mode is enabled or not
*/
public function __construct(ContainerInterface $container, $requestStack = null, $debug = false)
{
$this->container = $container;
parent::__construct(array(), $debug, $requestStack);
if ((null !== $requestStack && !$requestStack instanceof RequestStack) || $debug instanceof RequestStack) {
$tmp = $debug;
$debug = $requestStack;
$requestStack = func_num_args() < 3 ? null : $tmp;
@trigger_error('The '.__METHOD__.' method now requires a RequestStack to be given as second argument as '.__CLASS__.'::setRequest method will not be supported anymore in 3.0.', E_USER_DEPRECATED);
} elseif (!$requestStack instanceof RequestStack) {
@trigger_error('The '.__METHOD__.' method now requires a RequestStack instance as '.__CLASS__.'::setRequest method will not be supported anymore in 3.0.', E_USER_DEPRECATED);
}
parent::__construct($requestStack, array(), $debug);
}
/**