diff --git a/core/includes/common.inc b/core/includes/common.inc
index 1980f2f..018ecaf 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -448,7 +448,6 @@ function drupal_get_query_parameters(array $query = NULL, array $exclude = array
 /**
  * Parses an array into a valid, rawurlencoded query string.
  *
- * @see \Drupal\Core\Routing\PathBasedGeneratorInterface::httpBuildQuery()
  * @see drupal_get_query_parameters()
  * @deprecated as of Drupal 8.0. Use Url::buildQuery() instead.
  * @ingroup php_wrappers
@@ -1192,7 +1191,7 @@ function datetime_default_format_type() {
  * When creating links in modules, consider whether l() could be a better
  * alternative than url().
  *
- * @see \Drupal\Core\Routing\PathBasedGeneratorInterface::generateFromPath().
+ * @see \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath().
  */
 function url($path = NULL, array $options = array()) {
   $generator = Drupal::urlGenerator();
diff --git a/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
index fb60160..6aaf27a 100644
--- a/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
@@ -9,7 +9,6 @@
 
 use Drupal\Core\CacheDecorator\AliasManagerCacheDecorator;
 use Drupal\Core\PathProcessor\InboundPathProcessorInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
 use Symfony\Component\HttpKernel\KernelEvents;
 use Symfony\Component\HttpKernel\Event\GetResponseEvent;
diff --git a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
index 9da318e..376dee3 100644
--- a/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/RedirectResponseSubscriber.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\EventSubscriber;
 
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Symfony\Component\HttpKernel\KernelEvents;
 use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
 use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
@@ -22,17 +22,17 @@ class RedirectResponseSubscriber implements EventSubscriberInterface {
   /**
    * The url generator service.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
   /**
    * Constructs a RedirectResponseSubscriber object.
    *
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    */
-  public function __construct(PathBasedGeneratorInterface $url_generator) {
+  public function __construct(UrlGeneratorInterface $url_generator) {
     $this->urlGenerator = $url_generator;
   }
 
diff --git a/core/lib/Drupal/Core/Routing/NullGenerator.php b/core/lib/Drupal/Core/Routing/NullGenerator.php
index 8970247..137d3be 100644
--- a/core/lib/Drupal/Core/Routing/NullGenerator.php
+++ b/core/lib/Drupal/Core/Routing/NullGenerator.php
@@ -7,7 +7,6 @@
 
 namespace Drupal\Core\Routing;
 
-use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 use Symfony\Component\Routing\RequestContext;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 
@@ -23,9 +22,12 @@ public function __construct() {
   }
 
   /**
-   * Overrides Drupal\Core\Routing\UrlGenerator::generate();
+   * Overrides Drupal\Core\Routing\UrlGenerator::getRoute();
+   *
+   * generate(), generateFromRoute(), and getPathFromRoute() all call this
+   * protected method.
    */
-  public function generate($name, $parameters = array(), $absolute = FALSE) {
+  protected function getRoute($name) {
     throw new RouteNotFoundException();
   }
 
diff --git a/core/lib/Drupal/Core/Routing/PathBasedGeneratorInterface.php b/core/lib/Drupal/Core/Routing/PathBasedGeneratorInterface.php
deleted file mode 100644
index 79ed373..0000000
--- a/core/lib/Drupal/Core/Routing/PathBasedGeneratorInterface.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\Core\Routing\PathBasedGeneratorInterface.
- */
-
-namespace Drupal\Core\Routing;
-
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * Defines an interface for generating a url from a path as opposed to a route.
- */
-interface PathBasedGeneratorInterface {
-
-  /**
-   * Generates an internal or external URL.
-   *
-   * @param $path
-   *   (optional) The internal path or external URL being linked to, such as
-   *   "node/34" or "http://example.com/foo".
-   *
-   * @param $options
-   *   (optional) An associative array of additional options.
-   *
-   * @return
-   *   A string containing a URL to the given path.
-   */
-  public function generateFromPath($path = NULL, $options = array());
-
-  /**
-   * Gets the internal path of a route.
-   *
-   * @param string $name
-   *  The route name.
-   * @param array $parameters
-   *  An array of parameters as passed to
-   *  \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate().
-   *
-   * @return string
-   *  The internal Drupal path corresponding to the route.
-   */
-  public function getPathFromRoute($name, $parameters = array());
-
-  /**
-   * Sets the $request property.
-   *
-   * @param \Symfony\Component\HttpFoundation\Request $request
-   *   The HttpRequest object representing the current request.
-   */
-  public function setRequest(Request $request);
-
-  /**
-   * Sets the baseUrl property.
-   *
-   * This property is made up of scheme, host and base_path, e.g.
-   *   'http://www.example.com/mydrupalinstall/'
-   *
-   * The base url is usually set by the request but we allow it to be set
-   * independent of the request so that code that calls url() outside the context
-   * of a request can use the global $base_url variable to set this value.
-   *
-   * @todo Remove this once the url() function no longer supports being called
-   *   when there is no request.
-   *
-   * @var string $url
-   *   The base url to use for url generation.
-   */
-  public function setBaseUrl($url);
-
-  /**
-   * Sets the basePath property.
-   *
-   * This will be either '/' or '[subdir]/', where [subdir] is the name of the
-   * subdirectory that Drupal is running in.
-   *
-   * The base path is usually set by the request but we allow it to be set
-   * independent of the request so that code that calls url() outside the context
-   * of a request can use the global $base_url variable to set this value.
-   *
-   * @todo Remove this once the url() function no longer supports being called
-   *   when there is no request.
-   *
-   * @var string $path
-   *   The base path to use for url generation.
-   */
-  public function setBasePath($path);
-
-  /**
-   * Sets the scriptPath property.
-   *
-   * The script path is usually set by the request and is either 'index.php' or
-   * the empty string, depending on whether the request path actually contains
-   * the script path or not. We allow it to be set independent of the request so
-   * that code that calls url() outside the context of a request can use the global
-   * $script_path variable to set this value.
-   *
-   * @todo Remove this once the url() function no longer supports being called
-   *   when there is no request.
-   *
-   * @var string $path
-   *   The script path to use for url generation.
-   */
-  public function setScriptPath($path);
-
-}
diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php
index 402caa6..0624b94 100644
--- a/core/lib/Drupal/Core/Routing/UrlGenerator.php
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -23,7 +23,7 @@
 /**
  * A Generator creates URL strings based on a specified route.
  */
-class UrlGenerator extends ProviderBasedGenerator implements PathBasedGeneratorInterface {
+class UrlGenerator extends ProviderBasedGenerator implements UrlGeneratorInterface {
 
   /**
    * A request object.
@@ -87,7 +87,7 @@ public function __construct(RouteProviderInterface $provider, OutboundPathProces
   }
 
   /**
-   * Implements \Drupal\Core\Routing\PathBasedGeneratorInterface::setRequest().
+   * Implements \Drupal\Core\Routing\UrlGeneratorInterface::setRequest().
    */
   public function setRequest(Request $request) {
     $this->request = $request;
@@ -108,7 +108,7 @@ public function setRequest(Request $request) {
    * {@inheritdoc}
    */
   public function getPathFromRoute($name, $parameters = array()) {
-    $route = $this->getRoute($name, $parameters);
+    $route = $this->getRoute($name);
     $path = $this->getInternalPathFromRoute($route, $parameters);
     // Router-based paths may have a querystring on them but Drupal paths may
     // not have one, so remove any ? and anything after it. For generate() this
@@ -157,18 +157,41 @@ protected function getInternalPathFromRoute(SymfonyRoute $route, $parameters = a
    * {@inheritdoc}
    */
   public function generate($name, $parameters = array(), $absolute = FALSE) {
-    $route = $this->getRoute($name, $parameters);
-    $path = $this->getInternalPathFromRoute($route, $parameters);
-    $path = $this->processPath($path);
+    $options['absolute'] = $absolute;
+    return $this->generateFromRoute($name, $parameters, $options);
+  }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function generateFromRoute($name, $parameters = array(), $options = array()) {
+    $absolute = !empty($options['absolute']);
+    $route = $this->getRoute($name);
+    // Symfony adds any parameters that are not path slugs as query strings.
+    if (isset($options['query']) && is_array($options['query'])) {
+      $parameters = (array) $parameters + $options['query'];
+    }
+    $path = $this->getInternalPathFromRoute($route, $parameters);
+    $path = $this->processPath($path, $options);
+    $fragment = '';
+    if (isset($options['fragment'])) {
+      if (($fragment = trim($options['fragment'])) != '') {
+        $fragment = '#' . $fragment;
+      }
+    }
     $base_url = $this->context->getBaseUrl();
     if (!$absolute || !$host = $this->context->getHost()) {
-      return $base_url . $path;
+      return $base_url . $path . $fragment;
     }
 
     // Prepare an absolute URL by getting the correct scheme, host and port from
     // the request context.
-    $scheme = $this->context->getScheme();
+    if (isset($options['https']) && $this->mixedModeSessions) {
+      $scheme = $options['https'] ? 'https' : 'http';
+    }
+    else {
+      $scheme = $this->context->getScheme();
+    }
     $scheme_req = $route->getRequirement('_scheme');
     if (isset($scheme_req) && ($req = strtolower($scheme_req)) && $scheme !== $req) {
       $scheme = $req;
@@ -179,11 +202,11 @@ public function generate($name, $parameters = array(), $absolute = FALSE) {
     } elseif ('https' === $scheme && 443 != $this->context->getHttpsPort()) {
       $port = ':' . $this->context->getHttpsPort();
     }
-    return $scheme . '://' . $host . $port . $base_url . $path;
+    return $scheme . '://' . $host . $port . $base_url . $path . $fragment;
   }
 
   /**
-   * Implements \Drupal\Core\Routing\PathBasedGeneratorInterface::generateFromPath().
+   * Implements \Drupal\Core\Routing\UrlGeneratorInterface::generateFromPath().
    *
    * @param $path
    *   (optional) The internal path or external URL being linked to, such as
@@ -241,6 +264,9 @@ public function generate($name, $parameters = array(), $absolute = FALSE) {
    *   A string containing a URL to the given path.
    *
    * @throws \Drupal\Core\Routing\GeneratorNotInitializedException.
+   *
+   * @deprecated since version 8.0
+   *   System paths should not be used - use route names and parameters.
    */
   public function generateFromPath($path = NULL, $options = array()) {
 
@@ -329,21 +355,21 @@ public function generateFromPath($path = NULL, $options = array()) {
   }
 
   /**
-   * Implements \Drupal\Core\Routing\PathBasedGeneratorInterface::setBaseUrl().
+   * Implements \Drupal\Core\Routing\UrlGeneratorInterface::setBaseUrl().
    */
   public function setBaseUrl($url) {
     $this->baseUrl = $url;
   }
 
   /**
-   * Implements \Drupal\Core\Routing\PathBasedGeneratorInterface::setBasePath().
+   * Implements \Drupal\Core\Routing\UrlGeneratorInterface::setBasePath().
    */
   public function setBasePath($path) {
     $this->basePath = $path;
   }
 
   /**
-   * Implements \Drupal\Core\Routing\PathBasedGeneratorInterface::setScriptPath().
+   * Implements \Drupal\Core\Routing\UrlGeneratorInterface::setScriptPath().
    */
   public function setScriptPath($path) {
     $this->scriptPath = $path;
@@ -381,13 +407,10 @@ protected function initialized() {
   }
 
   /**
-   * Find the route using the provided route name (and parameters).
+   * Find the route using the provided route name.
    *
    * @param string $name
    *   The route name to fetch
-   * @param array $parameters
-   *   The parameters as they are passed to the UrlGeneratorInterface::generate
-   *   call.
    *
    * @return \Symfony\Component\Routing\Route
    *   The found route.
@@ -397,11 +420,11 @@ protected function initialized() {
    *
    * @see \Drupal\Core\Routing\RouteProviderInterface
    */
-  protected function getRoute($name, $parameters) {
+  protected function getRoute($name) {
     if ($name instanceof SymfonyRoute) {
       $route = $name;
     }
-    elseif (NULL === $route = $this->provider->getRouteByName($name, $parameters)) {
+    elseif (NULL === $route = $this->provider->getRouteByName($name)) {
       throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name));
     }
     return $route;
diff --git a/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php b/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php
new file mode 100644
index 0000000..326ff83
--- /dev/null
+++ b/core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php
@@ -0,0 +1,154 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Routing\UrlGeneratorInterface.
+ */
+
+namespace Drupal\Core\Routing;
+
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Cmf\Component\Routing\VersatileGeneratorInterface;
+
+/**
+ * Defines an interface for generating a url from a route (or path) with
+ * additional options not present in the base generator.
+ */
+interface UrlGeneratorInterface extends VersatileGeneratorInterface {
+
+  /**
+   * Generates an internal or external URL.
+   *
+   * @param string $path
+   *   (optional) The internal path or external URL being linked to, such as
+   *   "node/34" or "http://example.com/foo".
+   *
+   * @param array $options
+   *   (optional) An associative array of additional options.
+   *
+   * @return string
+   *   The URL to the given path.
+   *
+   * @deprecated since version 8.0
+   *   System paths should not be used - use route names and parameters.
+   */
+  public function generateFromPath($path = NULL, $options = array());
+
+  /**
+   * Gets the internal path of a route.
+   *
+   * @param string $name
+   *  The route name.
+   * @param array $parameters
+   *  An array of parameters as passed to
+   *  \Symfony\Component\Routing\Generator\UrlGeneratorInterface::generate().
+   *
+   * @return string
+   *  The internal Drupal path corresponding to the route.
+   *
+   * @deprecated since version 8.0
+   *   System paths should not be used - use route names and parameters.
+   */
+  public function getPathFromRoute($name, $parameters = array());
+
+  /**
+   * Generates a URL or path for a specific route based on the given parameters.
+   *
+   * Parameters that reference placeholders in the route pattern will be
+   * substituted for them in the pattern. Extra params are added as query
+   * strings to the URL.
+   *
+   * @param string $name
+   *   The name of the route
+   * @param array  $parameters
+   *   An associative array of parameter names and values.
+   * @param array $options
+   *   (optional) An associative array of additional options, with the following
+   *   elements:
+   *   - 'query': An array of query key/value-pairs (without any URL-encoding)
+   *     to append to the URL. Merged with the parameters array.
+   *   - 'fragment': A fragment identifier (named anchor) to append to the URL.
+   *     Do not include the leading '#' character.
+   *   - 'absolute': Defaults to FALSE. Whether to force the output to be an
+   *     absolute link (beginning with http:). Useful for links that will be
+   *     displayed outside the site, such as in an RSS feed.
+   *   - 'language': An optional language object used to look up the alias
+   *     for the URL. If $options['language'] is omitted, the language will be
+   *     obtained from language(Language::TYPE_URL).
+   *   - 'https': Whether this URL should point to a secure location. If not
+   *     defined, the current scheme is used, so the user stays on HTTP or HTTPS
+   *     respectively. if mixed mode sessions are permitted, TRUE enforces HTTPS
+   *     and FALSE enforces HTTP.
+   *
+   * @return string
+   *   The generated URL for the given route.
+   *
+   * @throws RouteNotFoundException              If the named route doesn't exist
+   * @throws MissingMandatoryParametersException 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
+   */
+  public function generateFromRoute($name, $parameters = array(), $options = array());
+
+  /**
+   * Sets the $request property.
+   *
+   * @param \Symfony\Component\HttpFoundation\Request $request
+   *   The HttpRequest object representing the current request.
+   */
+  public function setRequest(Request $request);
+
+  /**
+   * Sets the baseUrl property.
+   *
+   * This property is made up of scheme, host and base_path, e.g.
+   *   'http://www.example.com/mydrupalinstall/'
+   *
+   * The base url is usually set by the request but we allow it to be set
+   * independent of the request so that code that calls url() outside the context
+   * of a request can use the global $base_url variable to set this value.
+   *
+   * @todo Remove this once the url() function no longer supports being called
+   *   when there is no request.
+   *
+   * @var string $url
+   *   The base url to use for url generation.
+   */
+  public function setBaseUrl($url);
+
+  /**
+   * Sets the basePath property.
+   *
+   * This will be either '/' or '[subdir]/', where [subdir] is the name of the
+   * subdirectory that Drupal is running in.
+   *
+   * The base path is usually set by the request but we allow it to be set
+   * independent of the request so that code that calls url() outside the context
+   * of a request can use the global $base_url variable to set this value.
+   *
+   * @todo Remove this once the url() function no longer supports being called
+   *   when there is no request.
+   *
+   * @var string $path
+   *   The base path to use for url generation.
+   */
+  public function setBasePath($path);
+
+  /**
+   * Sets the scriptPath property.
+   *
+   * The script path is usually set by the request and is either 'index.php' or
+   * the empty string, depending on whether the request path actually contains
+   * the script path or not. We allow it to be set independent of the request so
+   * that code that calls url() outside the context of a request can use the global
+   * $script_path variable to set this value.
+   *
+   * @todo Remove this once the url() function no longer supports being called
+   *   when there is no request.
+   *
+   * @var string $path
+   *   The script path to use for url generation.
+   */
+  public function setScriptPath($path);
+
+}
diff --git a/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php b/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php
index fd158fb..cf4c323 100644
--- a/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php
+++ b/core/modules/action/lib/Drupal/action/Plugin/Action/GotoAction.php
@@ -11,7 +11,7 @@
 use Drupal\Core\Annotation\Translation;
 use Drupal\Core\Action\ConfigurableActionBase;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\EventDispatcher\EventDispatcherInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -38,7 +38,7 @@ class GotoAction extends ConfigurableActionBase implements ContainerFactoryPlugi
   /**
    * The url generator service.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -53,10 +53,10 @@ class GotoAction extends ConfigurableActionBase implements ContainerFactoryPlugi
    *   The plugin implementation definition.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
    *   The tempstore factory.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    */
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $dispatcher, PathBasedGeneratorInterface $url_generator) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, EventDispatcherInterface $dispatcher, UrlGeneratorInterface $url_generator) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
     $this->dispatcher = $dispatcher;
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
index a8b1d80..80a817d 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
@@ -13,7 +13,7 @@
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Entity\EntityManager;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpFoundation\Request;
@@ -55,7 +55,7 @@ class AggregatorController implements ControllerInterface {
   /**
    * The url generator.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -73,7 +73,7 @@ class AggregatorController implements ControllerInterface {
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
    */
-  public function __construct(EntityManager $entity_manager, Connection $database, ConfigFactory $config_factory, ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator) {
+  public function __construct(EntityManager $entity_manager, Connection $database, ConfigFactory $config_factory, ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator) {
     $this->entityManager = $entity_manager;
     $this->database = $database;
     $this->configFactory = $config_factory;
diff --git a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
index 84ef0c1..f320be4 100644
--- a/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
+++ b/core/modules/comment/lib/Drupal/comment/Controller/CommentController.php
@@ -10,7 +10,7 @@
 use Drupal\comment\CommentInterface;
 use Drupal\comment\Plugin\Core\Entity\Comment;
 use Drupal\Core\Controller\ControllerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpFoundation\Request;
@@ -28,7 +28,7 @@ class CommentController implements ControllerInterface {
   /**
    * The url generator service.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -42,12 +42,12 @@ class CommentController implements ControllerInterface {
   /**
    * Constructs a CommentController object.
    *
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    * @param \Symfony\Component\HttpKernel\HttpKernelInterface $httpKernel
    *   HTTP kernel to handle requests.
    */
-  public function __construct(PathBasedGeneratorInterface $url_generator, HttpKernelInterface $httpKernel) {
+  public function __construct(UrlGeneratorInterface $url_generator, HttpKernelInterface $httpKernel) {
     $this->urlGenerator = $url_generator;
     $this->httpKernel = $httpKernel;
   }
diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php
index 8c5cb96..34f7343 100644
--- a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php
+++ b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php
@@ -19,7 +19,7 @@
 use Drupal\Core\Config\ConfigException;
 use Drupal\Core\Config\ConfigFactory;
 use Drupal\Core\StringTranslation\Translator\TranslatorInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use \Drupal\Core\Entity\EntityManager;
 
 /**
@@ -76,7 +76,7 @@ class ConfigSync implements ControllerInterface, FormInterface {
   /**
    * URL generator service.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -99,10 +99,10 @@ class ConfigSync implements ControllerInterface, FormInterface {
    *   Entity manager.
    * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translation_manager
    *   The translation manager.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    */
-  public function __construct(StorageInterface $sourceStorage, StorageInterface $targetStorage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manger, TranslatorInterface $translation_manager, PathBasedGeneratorInterface $url_generator) {
+  public function __construct(StorageInterface $sourceStorage, StorageInterface $targetStorage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manger, TranslatorInterface $translation_manager, UrlGeneratorInterface $url_generator) {
     $this->sourceStorage = $sourceStorage;
     $this->targetStorage = $targetStorage;
     $this->lock = $lock;
diff --git a/core/modules/image/lib/Drupal/image/ImageStyleListController.php b/core/modules/image/lib/Drupal/image/ImageStyleListController.php
index c4b7e64..e6d0215 100644
--- a/core/modules/image/lib/Drupal/image/ImageStyleListController.php
+++ b/core/modules/image/lib/Drupal/image/ImageStyleListController.php
@@ -12,7 +12,7 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Drupal\Core\StringTranslation\Translator\TranslatorInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -24,7 +24,7 @@ class ImageStyleListController extends ConfigEntityListController implements Ent
   /**
    * The URL generator.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -46,12 +46,12 @@ class ImageStyleListController extends ConfigEntityListController implements Ent
    *   The image style entity storage controller class.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler to invoke hooks on.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The URL generator.
    * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translator
    *   The translation manager.
    */
-  public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $image_style_storage, ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator, TranslatorInterface $translator) {
+  public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $image_style_storage, ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator, TranslatorInterface $translator) {
     parent::__construct($entity_type, $entity_info, $image_style_storage, $module_handler);
     $this->urlGenerator = $url_generator;
     $this->translator = $translator;
diff --git a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php
index 7d95e3a..71bbd6c 100644
--- a/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php
+++ b/core/modules/locale/lib/Drupal/locale/Controller/LocaleController.php
@@ -7,7 +7,7 @@
 namespace Drupal\locale\Controller;
 
 use Drupal\Core\Controller\ControllerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -29,7 +29,7 @@ class LocaleController implements ControllerInterface {
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
    */
-  public function __construct(ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator) {
+  public function __construct(ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator) {
     $this->moduleHandler = $module_handler;
     $this->urlGenerator = $url_generator;
   }
diff --git a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php
index 5a3fdb0..18d89e3 100644
--- a/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php
+++ b/core/modules/node/lib/Drupal/node/Form/NodeDeleteForm.php
@@ -11,9 +11,8 @@
 use Drupal\Core\Entity\EntityNGConfirmFormBase;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
 
 /**
  * Provides a form for deleting a node.
@@ -23,7 +22,7 @@ class NodeDeleteForm extends EntityNGConfirmFormBase implements EntityController
   /**
    * The URL generator.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -39,12 +38,12 @@ class NodeDeleteForm extends EntityNGConfirmFormBase implements EntityController
    *
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler service.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The URL generator.
    * @param \Drupal\Core\Entity\EntityStorageControllerInterface $node_type_storage
    *   The node type storage.
    */
-  public function __construct(ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator, EntityStorageControllerInterface $node_type_storage) {
+  public function __construct(ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator, EntityStorageControllerInterface $node_type_storage) {
     parent::__construct($module_handler);
 
     $this->urlGenerator = $url_generator;
diff --git a/core/modules/node/lib/Drupal/node/NodeTypeListController.php b/core/modules/node/lib/Drupal/node/NodeTypeListController.php
index d6be67d..8502590 100644
--- a/core/modules/node/lib/Drupal/node/NodeTypeListController.php
+++ b/core/modules/node/lib/Drupal/node/NodeTypeListController.php
@@ -11,7 +11,7 @@
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Drupal\Core\Entity\EntityStorageControllerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Component\Utility\Xss;
 use Drupal\Component\Utility\String;
@@ -24,7 +24,7 @@ class NodeTypeListController extends ConfigEntityListController implements Entit
   /**
    * The url generator service.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -39,10 +39,10 @@ class NodeTypeListController extends ConfigEntityListController implements Entit
    *   The entity storage controller class.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler to invoke hooks on.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    */
-  public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator) {
+  public function __construct($entity_type, array $entity_info, EntityStorageControllerInterface $storage, ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator) {
     parent::__construct($entity_type, $entity_info, $storage, $module_handler);
     $this->urlGenerator = $url_generator;
   }
diff --git a/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php b/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php
index 8b8e49d..b4ba6fd 100644
--- a/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php
+++ b/core/modules/overlay/lib/Drupal/overlay/EventSubscriber/OverlaySubscriber.php
@@ -8,7 +8,7 @@
 namespace Drupal\overlay\EventSubscriber;
 
 use Drupal\Core\ContentNegotiation;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Drupal\user\UserData;
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -38,7 +38,7 @@ class OverlaySubscriber implements EventSubscriberInterface {
   /**
    * The url generator service.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -49,10 +49,10 @@ class OverlaySubscriber implements EventSubscriberInterface {
    *   The content negotiation service.
    * @param \Drupal\user\UserData $user_data
    *   The user.data service.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The url generator service.
    */
-  public function __construct(ContentNegotiation $negotiation, UserData $user_data, PathBasedGeneratorInterface $url_generator) {
+  public function __construct(ContentNegotiation $negotiation, UserData $user_data, UrlGeneratorInterface $url_generator) {
     $this->negotiation = $negotiation;
     $this->userData = $user_data;
     $this->urlGenerator = $url_generator;
diff --git a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php
index a67b53b..0d8a3bd 100644
--- a/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php
+++ b/core/modules/shortcut/lib/Drupal/shortcut/Controller/ShortcutSetController.php
@@ -10,7 +10,7 @@
 use Drupal\Core\Controller\ControllerInterface;
 use Drupal\Core\Entity\EntityManager;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Routing\PathBasedGeneratorInterface;
+use Drupal\Core\Routing\UrlGeneratorInterface;
 use Drupal\shortcut\ShortcutSetInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
@@ -39,7 +39,7 @@ class ShortcutSetController implements ControllerInterface {
   /**
    * The URL generator.
    *
-   * @var \Drupal\Core\Routing\PathBasedGeneratorInterface
+   * @var \Drupal\Core\Routing\UrlGeneratorInterface
    */
   protected $urlGenerator;
 
@@ -50,10 +50,10 @@ class ShortcutSetController implements ControllerInterface {
    *   The entity manager.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
-   * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator
+   * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator
    *   The URL generator.
    */
-   public function __construct(EntityManager $entity_manager, ModuleHandlerInterface $module_handler, PathBasedGeneratorInterface $url_generator) {
+   public function __construct(EntityManager $entity_manager, ModuleHandlerInterface $module_handler, UrlGeneratorInterface $url_generator) {
      $this->entityManager = $entity_manager;
      $this->moduleHandler = $module_handler;
      $this->urlGenerator = $url_generator;
diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
index d6006ad..75d051d 100644
--- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
@@ -37,6 +37,13 @@ class UrlGeneratorTest extends UnitTestCase {
    */
   protected $generator;
 
+  /**
+   * A second url generator to test, set to assume mixed-mode sessions.
+   *
+   * @var \Drupal\Core\Routing\UrlGenerator
+   */
+  protected $generatorMixedMode;
+
   protected $aliasManager;
 
   public static function getInfo() {
@@ -65,33 +72,29 @@ function setUp() {
       ->getMock();
     // We need to set up return value maps for both the getRouteByName() and the
     // getRoutesByNames() method calls on the route provider. The parameters
-    // passed in will be slightly different but based on the same information.
+    // are not passed in and default to an empty array.
     $route_name_return_map = $routes_names_return_map = array();
     $return_map_values = array(
       array(
         'route_name' => 'test_1',
-        'parameters' => array(),
         'return' => $first_route,
       ),
       array(
         'route_name' => 'test_2',
-        'parameters' => array('narf' => '5'),
         'return' => $second_route,
       ),
       array(
         'route_name' => 'test_3',
-        'parameters' => array(),
         'return' => $third_route,
       ),
       array(
         'route_name' => 'test_4',
-        'parameters' => array(),
         'return' => $fourth_route,
       ),
     );
     foreach ($return_map_values as $values) {
-      $route_name_return_map[] = array($values['route_name'], $values['parameters'], $values['return']);
-      $routes_names_return_map[] = array(array($values['route_name']), $values['parameters'], $values['return']);
+      $route_name_return_map[] = array($values['route_name'], array(), $values['return']);
+      $routes_names_return_map[] = array(array($values['route_name']), array(), $values['return']);
     }
     $provider->expects($this->any())
       ->method('getRouteByName')
@@ -122,8 +125,12 @@ function setUp() {
 
     $generator = new UrlGenerator($provider, $processor_manager, $config_factory_stub, new Settings(array()));
     $generator->setContext($context);
-
     $this->generator = $generator;
+
+    // Second generator for mixed-mode sessions.
+    $generator = new UrlGenerator($provider, $processor_manager, $config_factory_stub, new Settings(array('mixed_mode_sessions' => TRUE)));
+    $generator->setContext($context);
+    $this->generatorMixedMode = $generator;
   }
 
   /**
@@ -156,6 +163,10 @@ public function testAliasGeneration() {
     $url = $this->generator->generate('test_1');
     $this->assertEquals('/hello/world', $url);
 
+    // Check that the two generate methods return the same result.
+    $url_from_route = $this->generator->generateFromRoute('test_1');
+    $this->assertEquals($url_from_route, $url);
+
     $path = $this->generator->getPathFromRoute('test_1');
     $this->assertEquals('test/one', $path);
   }
@@ -175,7 +186,20 @@ public function testGetPathFromRouteWithSubdirectory() {
    */
   public function testAliasGenerationWithParameters() {
     $url = $this->generator->generate('test_2', array('narf' => '5'));
-    $this->assertEquals('/goodbye/cruel/world', $url, 'Correct URL generated including alias and parameters.');
+    $this->assertEquals('/goodbye/cruel/world', $url);
+
+    $options = array('fragment' => 'top');
+    // Extra parameters should appear in the query string.
+    $url = $this->generator->generateFromRoute('test_1', array('zoo' => '5'), $options);
+    $this->assertEquals('/hello/world?zoo=5#top', $url);
+
+    $options = array('query' => array('page' => '1'), 'fragment' => 'bottom');
+    $url = $this->generator->generateFromRoute('test_2', array('narf' => '5'), $options);
+    $this->assertEquals('/goodbye/cruel/world?page=1#bottom', $url);
+
+    // Changing the parameters, the route still matches but there is no alias.
+    $url = $this->generator->generateFromRoute('test_2', array('narf' => '7'), $options);
+    $this->assertEquals('/test/two/7?page=1#bottom', $url);
 
     $path = $this->generator->getPathFromRoute('test_2', array('narf' => '5'));
     $this->assertEquals('test/two/5', $path);
@@ -195,6 +219,11 @@ public function testGetPathFromRouteTrailing() {
   public function testAbsoluteURLGeneration() {
     $url = $this->generator->generate('test_1', array(), TRUE);
     $this->assertEquals('http://localhost/hello/world', $url);
+
+    $options = array('absolute' => TRUE, 'fragment' => 'top');
+    // Extra parameters should appear in the query string.
+    $url = $this->generator->generateFromRoute('test_1', array('zoo' => '5'), $options);
+    $this->assertEquals('http://localhost/hello/world?zoo=5#top', $url);
   }
 
   /**
@@ -203,6 +232,15 @@ public function testAbsoluteURLGeneration() {
   public function testUrlGenerationWithHttpsRequirement() {
     $url = $this->generator->generate('test_4', array(), TRUE);
     $this->assertEquals('https://localhost/test/four', $url);
+
+    $options = array('absolute' => TRUE, 'https' => TRUE);
+    // Mixed-mode sessions are not enabled, so the https option is ignored.
+    $url = $this->generator->generateFromRoute('test_1', array(), $options);
+    $this->assertEquals('http://localhost/hello/world', $url);
+
+    // Mixed-mode sessions are enabled, so the https option is obeyed.
+    $url = $this->generatorMixedMode->generateFromRoute('test_1', array(), $options);
+    $this->assertEquals('https://localhost/hello/world', $url);
   }
 
   /**
