Update to drupal-org-drupal 8.0.0-rc2. For more information, see https://www.drupal.org/node/2598668

This commit is contained in:
Pantheon Automation 2015-10-21 21:44:50 -07:00 committed by Greg Anderson
parent f32e58e4b1
commit 8e18df8c36
3062 changed files with 15044 additions and 172506 deletions

View file

@ -0,0 +1,37 @@
<?php
/**
* @file
* Contains \Drupal\Core\Routing\CacheableSecuredRedirectResponse.
*/
namespace Drupal\Core\Routing;
use Drupal\Component\HttpFoundation\SecuredRedirectResponse;
use Drupal\Core\Cache\CacheableResponseInterface;
use Drupal\Core\Cache\CacheableResponseTrait;
use Symfony\Component\HttpFoundation\RedirectResponse;
/**
* Provides a common base class for cacheable safe redirects.
*/
abstract class CacheableSecuredRedirectResponse extends SecuredRedirectResponse implements CacheableResponseInterface {
use CacheableResponseTrait;
/**
* {@inheritdoc}
*/
protected function fromResponse(RedirectResponse $response) {
parent::fromResponse($response);
$metadata = $this->getCacheableMetadata();
if ($response instanceof CacheableResponseInterface) {
$metadata->addCacheableDependency($response->getCacheableMetadata());
}
else {
$metadata->setCacheMaxAge(0);
}
}
}

View file

@ -10,7 +10,6 @@ namespace Drupal\Core\Routing;
use Drupal\Core\Url;
use Drupal\Core\Utility\LinkGeneratorInterface;
use Drupal\Core\Routing\UrlGeneratorInterface;
/**
* Wrapper methods for the Link Generator.

View file

@ -7,12 +7,10 @@
namespace Drupal\Core\Routing;
use Drupal\Component\HttpFoundation\SecuredRedirectResponse;
/**
* Provides a redirect response which cannot redirect to an external URL.
*/
class LocalRedirectResponse extends SecuredRedirectResponse {
class LocalRedirectResponse extends CacheableSecuredRedirectResponse {
use LocalAwareRedirectResponseTrait {
LocalAwareRedirectResponseTrait::isLocal as isSafe;

View file

@ -19,8 +19,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
use \Drupal\Core\Database\Connection;
/**

View file

@ -8,7 +8,6 @@
namespace Drupal\Core\Routing;
use Symfony\Cmf\Component\Routing\RouteProviderInterface as RouteProviderBaseInterface;
use Symfony\Component\Routing\RouteCollection;
/**
* Extends the router provider interface

View file

@ -7,7 +7,6 @@
namespace Drupal\Core\Routing;
use Drupal\Core\Routing\RoutingEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Routing\RouteCollection;

View file

@ -7,14 +7,12 @@
namespace Drupal\Core\Routing;
use Drupal\Component\HttpFoundation\SecuredRedirectResponse;
/**
* Provides a redirect response which contains trusted URLs.
*
* Use this class in case you know that you want to redirect to an external URL.
*/
class TrustedRedirectResponse extends SecuredRedirectResponse {
class TrustedRedirectResponse extends CacheableSecuredRedirectResponse {
use LocalAwareRedirectResponseTrait;

View file

@ -14,7 +14,6 @@ use Symfony\Component\Routing\RequestContext as SymfonyRequestContext;
use Symfony\Component\Routing\Route as SymfonyRoute;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
use Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface;
use Symfony\Component\Routing\Exception\InvalidParameterException;

View file

@ -17,7 +17,7 @@ use Symfony\Cmf\Component\Routing\VersatileGeneratorInterface;
interface UrlGeneratorInterface extends VersatileGeneratorInterface {
/**
* Gets the internal path (system path) of a route.
* Gets the internal path (system path) for a route.
*
* @param string|\Symfony\Component\Routing\Route $name
* The route name or a route object.
@ -27,9 +27,6 @@ interface UrlGeneratorInterface extends VersatileGeneratorInterface {
*
* @return string
* The internal Drupal path corresponding to the route.
*
* @deprecated in Drupal 8.0.x-dev, will be removed before Drupal 8.0.0
* System paths should not be used - use route names and parameters.
*/
public function getPathFromRoute($name, $parameters = array());