Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
@ -163,5 +163,4 @@ class CompiledRoute extends SymfonyCompiledRoute {
|
|||
$this->numParts = $data['numParts'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ trait LinkGeneratorTrait {
|
|||
/**
|
||||
* Renders a link to a route given a route name and its parameters.
|
||||
*
|
||||
* @see \Drupal\Core\Utility\LinkGeneratorInterface::generate() for details
|
||||
* on the arguments, usage, and possible exceptions.
|
||||
* For details on the arguments, usage, and possible exceptions see
|
||||
* \Drupal\Core\Utility\LinkGeneratorInterface::generate().
|
||||
*
|
||||
* @return \Drupal\Core\GeneratedLink
|
||||
* A GeneratedLink object containing a link to the given route and
|
||||
|
@ -38,6 +38,8 @@ trait LinkGeneratorTrait {
|
|||
*
|
||||
* @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
|
||||
* Use \Drupal\Core\Link instead.
|
||||
*
|
||||
* @see \Drupal\Core\Utility\LinkGeneratorInterface::generate()
|
||||
*/
|
||||
protected function l($text, Url $url) {
|
||||
return $this->getLinkGenerator()->generate($text, $url);
|
||||
|
@ -69,4 +71,5 @@ trait LinkGeneratorTrait {
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -142,7 +142,8 @@ class MatcherDumper implements MatcherDumperInterface {
|
|||
}
|
||||
|
||||
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
$transaction->rollback();
|
||||
watchdog_exception('Routing', $e);
|
||||
throw $e;
|
||||
|
|
|
@ -74,4 +74,5 @@ class NullGenerator extends UrlGenerator {
|
|||
protected function processPath($path, &$options = array(), BubbleableMetadata $bubbleable_metadata = NULL) {
|
||||
return $path;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -134,7 +134,8 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
|
|||
* very large route sets to be filtered down to likely candidates, which
|
||||
* may then be filtered in memory more completely.
|
||||
*
|
||||
* @param Request $request A request against which to match.
|
||||
* @param Request $request
|
||||
* A request against which to match.
|
||||
*
|
||||
* @return \Symfony\Component\Routing\RouteCollection with all urls that
|
||||
* could potentially match $request. Empty collection if nothing can
|
||||
|
@ -143,7 +144,7 @@ class RouteProvider implements PreloadableRouteProviderInterface, PagedRouteProv
|
|||
public function getRouteCollectionForRequest(Request $request) {
|
||||
// Cache both the system path as well as route parameters and matching
|
||||
// routes.
|
||||
$cid = 'route:' . $request->getPathInfo() . ':' . $request->getQueryString();
|
||||
$cid = 'route:' . $request->getPathInfo() . ':' . $request->getQueryString();
|
||||
if ($cached = $this->cache->get($cid)) {
|
||||
$this->currentPath->setPath($cached->data['path'], $request);
|
||||
$request->query->replace($cached->data['query']);
|
||||
|
|
|
@ -63,7 +63,7 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
];
|
||||
|
||||
/**
|
||||
* Constructs a new generator object.
|
||||
* Constructs a new generator object.
|
||||
*
|
||||
* @param \Drupal\Core\Routing\RouteProviderInterface $provider
|
||||
* The route provider to be searched for routes.
|
||||
|
@ -157,10 +157,10 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
* The url path, without any base path, including possible query string.
|
||||
*
|
||||
* @throws MissingMandatoryParametersException
|
||||
* When some parameters are missing that are mandatory for the route
|
||||
* When some parameters are missing that are mandatory for the route.
|
||||
* @throws InvalidParameterException
|
||||
* When a parameter value for a placeholder is not correct because it does
|
||||
* not match the requirement
|
||||
* not match the requirement.
|
||||
*/
|
||||
protected function doGenerate(array $variables, array $defaults, array $tokens, array $parameters, array $query_params, $name) {
|
||||
$variables = array_flip($variables);
|
||||
|
@ -188,7 +188,7 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
if ('variable' === $token[0]) {
|
||||
if (!$optional || !array_key_exists($token[3], $defaults) || (isset($mergedParams[$token[3]]) && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]])) {
|
||||
// check requirement
|
||||
if (!preg_match('#^'.$token[2].'$#', $mergedParams[$token[3]])) {
|
||||
if (!preg_match('#^' . $token[2] . '$#', $mergedParams[$token[3]])) {
|
||||
$message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]);
|
||||
throw new InvalidParameterException($message);
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
if ($query_params && $query = http_build_query($query_params, '', '&')) {
|
||||
// "/" and "?" can be left decoded for better user experience, see
|
||||
// http://tools.ietf.org/html/rfc3986#section-3.4
|
||||
$url .= '?'.strtr($query, array('%2F' => '/'));
|
||||
$url .= '?' . strtr($query, array('%2F' => '/'));
|
||||
}
|
||||
|
||||
return $url;
|
||||
|
@ -358,7 +358,8 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
$port = '';
|
||||
if ('http' === $scheme && 80 != $this->context->getHttpPort()) {
|
||||
$port = ':' . $this->context->getHttpPort();
|
||||
} elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) {
|
||||
}
|
||||
elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) {
|
||||
$port = ':' . $this->context->getHttpsPort();
|
||||
}
|
||||
if ($collect_bubbleable_metadata) {
|
||||
|
@ -451,4 +452,5 @@ class UrlGenerator implements UrlGeneratorInterface {
|
|||
|
||||
return serialize($name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ interface UrlGeneratorInterface extends VersatileGeneratorInterface {
|
|||
*
|
||||
* @param string|\Symfony\Component\Routing\Route $name
|
||||
* The route name or a route object.
|
||||
* @param array $parameters
|
||||
* @param array $parameters
|
||||
* An associative array of parameter names and values.
|
||||
* @param array $options
|
||||
* (optional) An associative array of additional options, with the following
|
||||
|
|
|
@ -27,14 +27,16 @@ trait UrlGeneratorTrait {
|
|||
/**
|
||||
* Generates a URL or path for a specific route based on the given parameters.
|
||||
*
|
||||
* @see \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() for
|
||||
* details on the arguments, usage, and possible exceptions.
|
||||
* For details on the arguments, usage, and possible exceptions see
|
||||
* \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute().
|
||||
*
|
||||
* @return string
|
||||
* The generated URL for the given route.
|
||||
*
|
||||
* @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0.
|
||||
* Use \Drupal\Core\Url instead.
|
||||
*
|
||||
* @see \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute()
|
||||
*/
|
||||
protected function url($route_name, $route_parameters = array(), $options = array()) {
|
||||
return $this->getUrlGenerator()->generateFromRoute($route_name, $route_parameters, $options);
|
||||
|
@ -88,4 +90,5 @@ trait UrlGeneratorTrait {
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue