diff --git a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php
index 39f9ceb..f874f6a 100644
--- a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php
@@ -57,7 +57,7 @@ protected function alterRoutes(RouteCollection $collection, $module) {
    */
   public function onAlterRoutes(RouteBuildEvent $event) {
     $collection = $event->getRouteCollection();
-    return $this->alterRoutes($collection, $event->getModule());
+    return $this->alterRoutes($collection, $event->getProvider());
   }
 
 }
diff --git a/core/lib/Drupal/Core/Routing/RouteBuildEvent.php b/core/lib/Drupal/Core/Routing/RouteBuildEvent.php
index 017b83a..04db107 100644
--- a/core/lib/Drupal/Core/Routing/RouteBuildEvent.php
+++ b/core/lib/Drupal/Core/Routing/RouteBuildEvent.php
@@ -23,11 +23,11 @@ class RouteBuildEvent extends Event {
   protected $routeCollection;
 
   /**
-   * The module name that provides the route.
+   * The provider of this route collection.
    *
    * @var string
    */
-  protected $module;
+  protected $provider;
 
   /**
    * Constructs a RouteBuildEvent object.
@@ -45,10 +45,10 @@ public function getRouteCollection() {
   }
 
   /**
-   * Gets the module that provides the route.
+   * Gets the provider for this route collection.
    */
-  public function getModule() {
-    return $this->module;
+  public function getProvider() {
+    return $this->provider;
   }
 
 }
diff --git a/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php b/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php
index 615a820..82b2643 100644
--- a/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php
+++ b/core/lib/Drupal/Core/Routing/RouteSubscriberBase.php
@@ -20,7 +20,7 @@
    * Provides new routes by adding them to the collection.
    *
    * Subclasses should use this method and add \Symfony\Component\Routing\Route
-   * objects with $collection->add($route);.
+   * objects with $collection->add('route_name', $route);.
    *
    * @param \Symfony\Component\Routing\RouteCollection $collection
    *   The route collection for adding routes.
@@ -33,11 +33,11 @@ protected function routes(RouteCollection $collection) {
    *
    * @param \Symfony\Component\Routing\RouteCollection $collection
    *   The route collection for adding routes.
-   * @param string $module
-   *   The module these routes belong to. For dynamically added routes, the
-   *   module name will be 'dynamic_routes'.
+   * @param string $provider
+   *   The provider these routes belong to. For dynamically added routes, the
+   *   provider name will be 'dynamic_routes'.
    */
-  protected function alterRoutes(RouteCollection $collection, $module) {
+  protected function alterRoutes(RouteCollection $collection, $provider) {
   }
 
   /**
@@ -68,7 +68,7 @@ public function onDynamicRoutes(RouteBuildEvent $event) {
    */
   public function onAlterRoutes(RouteBuildEvent $event) {
     $collection = $event->getRouteCollection();
-    $this->alterRoutes($collection, $event->getModule());
+    $this->alterRoutes($collection, $event->getProvider());
   }
 
 }
diff --git a/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/RouteTestSubscriber.php b/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/RouteTestSubscriber.php
index cc63d39..e658b11 100644
--- a/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/RouteTestSubscriber.php
+++ b/core/modules/system/tests/modules/router_test_directory/lib/Drupal/router_test/RouteTestSubscriber.php
@@ -51,7 +51,7 @@ public function dynamicRoutes(RouteBuildEvent $event) {
    *   The altered route collection.
    */
   public function alterRoutes(RouteBuildEvent $event) {
-    if ($event->getModule() == 'router_test') {
+    if ($event->getProvider() == 'router_test') {
       $collection = $event->getRouteCollection();
       $route = $collection->get('router_test.6');
       // Change controller method from test1 to test5.
