diff --git a/payment/lib/Drupal/payment/Entity/Payment.php b/payment/lib/Drupal/payment/Entity/Payment.php index fb733ec..453a121 100644 --- a/payment/lib/Drupal/payment/Entity/Payment.php +++ b/payment/lib/Drupal/payment/Entity/Payment.php @@ -223,7 +223,7 @@ class Payment extends ContentEntityBase implements PaymentInterface { $this->statuses[] = $status; } if ($notify) { - /** @var n $event_dispatcher */ + /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher */ $event_dispatcher = \Drupal::service('event_dispatcher'); $event = new PaymentStatusSet($this, $previous_status); $event_dispatcher->dispatch(PaymentEvents::PAYMENT_STATUS_SET, $event); diff --git a/payment/lib/Drupal/payment/Plugin/Payment/Method/Basic.php b/payment/lib/Drupal/payment/Plugin/Payment/Method/Basic.php index 3c778b4..7a68508 100644 --- a/payment/lib/Drupal/payment/Plugin/Payment/Method/Basic.php +++ b/payment/lib/Drupal/payment/Plugin/Payment/Method/Basic.php @@ -64,7 +64,7 @@ class Basic extends PaymentMethodBase implements ContainerFactoryPluginInterface * {@inheritdoc} */ public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - return new static($configuration, $plugin_id, $plugin_definition, $container->get('module_handler'), $container->get('module_handler'), $container->get('token'), $container->get('plugin.manager.payment.status')); + return new static($configuration, $plugin_id, $plugin_definition, $container->get('module_handler'), $container->get('event_dispatcher'), $container->get('token'), $container->get('plugin.manager.payment.status')); } /** diff --git a/payment/lib/Drupal/payment/Tests/QueueWebTest.php b/payment/lib/Drupal/payment/Tests/QueueWebTest.php index a0ce06b..f0e9106 100644 --- a/payment/lib/Drupal/payment/Tests/QueueWebTest.php +++ b/payment/lib/Drupal/payment/Tests/QueueWebTest.php @@ -70,7 +70,7 @@ class QueueWebTest extends WebTestBase { $this->paymentMethodManager = \Drupal::service('plugin.manager.payment.method'); $this->paymentStatusManager = \Drupal::service('plugin.manager.payment.status'); $queue_id = $this->randomName(); - $this->queue = new Queue($queue_id, $this->database, \Drupal::moduleHandler(), $this->paymentStatusManager); + $this->queue = new Queue($queue_id, $this->database, \Drupal::moduleHandler(), \Drupal::service('event_dispatcher'), $this->paymentStatusManager); } /**