From b619a2c619428ebd873426b9f24f31b387886163 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Tue, 6 May 2014 18:57:19 -0700
Subject: [PATCH] Issue #2241827 follow-up by tim.plunkett, sun: Switch from
 form builder to new form validator.

---
 .../Drupal/rest/Plugin/views/display/RestExport.php    | 10 +++++-----
 .../rest/tests/Drupal/rest/Tests/CollectRoutesTest.php |  4 ++--
 .../views/Plugin/views/display/PathPluginBase.php      |  2 +-
 .../Drupal/views_ui/Tests/ViewListBuilderTest.php      |  4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php b/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php
index c6055e2c1407..263e44193546 100644
--- a/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php
+++ b/core/modules/rest/lib/Drupal/rest/Plugin/views/display/RestExport.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\rest\Plugin\views\display;
 
-use Drupal\Core\Form\FormBuilderInterface;
+use Drupal\Core\Form\FormErrorInterface;
 use Drupal\Core\State\StateInterface;
 use Drupal\Core\Routing\RouteProviderInterface;
 use Drupal\Core\ContentNegotiation;
@@ -99,14 +99,14 @@ class RestExport extends PathPluginBase {
    *   The route provider
    * @param \Drupal\Core\State\StateInterface $state
    *   The state key value store.
-   * @param \Drupal\Core\Form\FormBuilderInterface $form_error
-   *   The form builder.
+   * @param \Drupal\Core\Form\FormErrorInterface $form_error
+   *   The form error helper.
    * @param \Drupal\Core\ContentNegotiation $content_negotiation
    *   The content negotiation library.
    * @param \Symfony\Component\HttpFoundation\Request $request
    *   The request object.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, FormBuilderInterface $form_error, ContentNegotiation $content_negotiation, Request $request) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, RouteProviderInterface $route_provider, StateInterface $state, FormErrorInterface $form_error, ContentNegotiation $content_negotiation, Request $request) {
     parent::__construct($configuration, $plugin_id, $plugin_definition, $route_provider, $state, $form_error);
     $this->contentNegotiation = $content_negotiation;
     $this->request = $request;
@@ -122,7 +122,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $plugin_definition,
       $container->get('router.route_provider'),
       $container->get('state'),
-      $container->get('form_builder'),
+      $container->get('form_validator'),
       $container->get('content_negotiation'),
       $container->get('request')
     );
diff --git a/core/modules/rest/tests/Drupal/rest/Tests/CollectRoutesTest.php b/core/modules/rest/tests/Drupal/rest/Tests/CollectRoutesTest.php
index db0e724fdce7..f5111923deae 100644
--- a/core/modules/rest/tests/Drupal/rest/Tests/CollectRoutesTest.php
+++ b/core/modules/rest/tests/Drupal/rest/Tests/CollectRoutesTest.php
@@ -90,8 +90,8 @@ protected function setUp() {
       ->getMock();
     $container->set('plugin.manager.views.style', $style_manager);
 
-    $form_builder = $this->getMock('Drupal\Core\Form\FormBuilderInterface');
-    $container->set('form_builder', $form_builder);
+    $form_error = $this->getMock('Drupal\Core\Form\FormErrorInterface');
+    $container->set('form_validator', $form_error);
 
     \Drupal::setContainer($container);
 
diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
index baa777307d98..44127ec061b8 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/views/display/PathPluginBase.php
@@ -81,7 +81,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $plugin_definition,
       $container->get('router.route_provider'),
       $container->get('state'),
-      $container->get('form_builder')
+      $container->get('form_validator')
     );
   }
 
diff --git a/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListBuilderTest.php b/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListBuilderTest.php
index 73f5013e7c89..9674f0e49288 100644
--- a/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListBuilderTest.php
+++ b/core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewListBuilderTest.php
@@ -79,10 +79,10 @@ public function testBuildRowEntityList() {
     );
     $route_provider = $this->getMock('Drupal\Core\Routing\RouteProviderInterface');
     $state = $this->getMock('\Drupal\Core\State\StateInterface');
-    $form_builder = $this->getMock('Drupal\Core\Form\FormBuilderInterface');
+    $form_error = $this->getMock('Drupal\Core\Form\FormErrorInterface');
     $page_display = $this->getMock('Drupal\views\Plugin\views\display\Page',
       array('initDisplay', 'getPath'),
-      array(array(), 'default', $display_manager->getDefinition('page'), $route_provider, $state, $form_builder)
+      array(array(), 'default', $display_manager->getDefinition('page'), $route_provider, $state, $form_error)
     );
     $page_display->expects($this->any())
       ->method('getPath')
-- 
GitLab