From 43e50a78e7f341dca97efe38a61bad302c236ebf Mon Sep 17 00:00:00 2001
From: Alex Rhodes <rhodes@messageagency.com>
Date: Tue, 13 Jun 2017 14:57:35 +0000
Subject: [PATCH] Converts injected classes to interfaces; resolves conflicts
 with webprofiler module

---
 .../src/Plugin/SalesforcePushQueueProcessor/Rest.php       | 7 ++++---
 modules/salesforce_push/src/PushQueue.php                  | 6 +++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php b/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
index 706476f6..5743a0e7 100644
--- a/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
+++ b/modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
@@ -2,8 +2,9 @@
 
 namespace Drupal\salesforce_push\Plugin\SalesforcePushQueueProcessor;
 
-use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher;
-use Drupal\Core\Entity\EntityTypeManager;
+use Drupal\Component\EventDispatcher\ContainerAwareEventDispatcherInterface;
+use Symfony\Component\EventDispatcher\EventDispatcherInterface;
+use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Plugin\PluginBase;
 use Drupal\Core\Queue\SuspendQueueException;
 use Drupal\salesforce\EntityNotFoundException;
@@ -44,7 +45,7 @@ class Rest extends PluginBase implements PushQueueProcessorInterface {
   protected $event_dispatcher;
   protected $etm;
 
-  public function __construct(array $configuration, $plugin_id, array $plugin_definition, PushQueue $queue, RestClientInterface $client,  EntityTypeManager $etm, ContainerAwareEventDispatcher $event_dispatcher) {
+  public function __construct(array $configuration, $plugin_id, array $plugin_definition, PushQueue $queue, RestClientInterface $client,  EntityTypeManagerInterface $etm, EventDispatcherInterface $event_dispatcher) {
     $this->queue = $queue;
     $this->client = $client;
     $this->etm = $etm;
diff --git a/modules/salesforce_push/src/PushQueue.php b/modules/salesforce_push/src/PushQueue.php
index efcde2cd..d4997888 100644
--- a/modules/salesforce_push/src/PushQueue.php
+++ b/modules/salesforce_push/src/PushQueue.php
@@ -9,7 +9,7 @@ use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Queue\DatabaseQueue;
 use Drupal\Core\Queue\RequeueException;
 use Drupal\Core\Queue\SuspendQueueException;
-use Drupal\Core\State\State;
+use Drupal\Core\State\StateInterface;
 use Drupal\salesforce\EntityNotFoundException;
 use Drupal\salesforce\Event\SalesforceErrorEvent;
 use Drupal\salesforce\Event\SalesforceNoticeEvent;
@@ -63,7 +63,7 @@ class PushQueue extends DatabaseQueue {
    * @param \Drupal\Core\Database\Connection $connection
    *   The Connection object containing the key-value tables.
    */
-  public function __construct(Connection $connection, State $state, PushQueueProcessorPluginManager $queue_manager, EntityManagerInterface $entity_manager, EventDispatcherInterface $event_dispatcher) {
+  public function __construct(Connection $connection, StateInterface $state, PushQueueProcessorPluginManager $queue_manager, EntityManagerInterface $entity_manager, EventDispatcherInterface $event_dispatcher) {
     $this->connection = $connection;
     $this->state = $state;
     $this->queueManager = $queue_manager;
@@ -303,7 +303,7 @@ class PushQueue extends DatabaseQueue {
   /**
    * Given a salesforce mapping, process all its push queue entries.
    *
-   * @param SalesforceMapping $mapping 
+   * @param SalesforceMapping $mapping
    *
    * @return int
    *   The number of items procesed, or -1 if there was any error, And also
-- 
GitLab