Commit 815ccd87 authored by Tiago Siqueira's avatar Tiago Siqueira
Browse files

Issue #3254114 by tbsiqueira: Wrong UuidInterface instance on SocialEmbedHelper (#2649)

parent eff750f7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ namespace Drupal\social_embed\Plugin\Filter;

use Drupal\Component\Utility\Html;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Component\Uuid\Php;
use Drupal\Component\Uuid\UuidInterface;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\filter\FilterProcessResult;
@@ -29,9 +29,9 @@ class SocialEmbedUrlEmbedFilter extends UrlEmbedFilter {
  /**
   * Uuid services.
   *
   * @var \Drupal\Component\Uuid\Php
   * @var \Drupal\Component\Uuid\UuidInterface
   */
  protected Php $uuid;
  protected UuidInterface $uuid;

  /**
   * The config factory services.
@@ -65,7 +65,7 @@ class SocialEmbedUrlEmbedFilter extends UrlEmbedFilter {
   *   The plugin implementation definition.
   * @param \Drupal\url_embed\UrlEmbedInterface $url_embed
   *   The URL embed service.
   * @param \Drupal\Component\Uuid\Php $uuid
   * @param \Drupal\Component\Uuid\UuidInterface $uuid
   *   The uuid services.
   * @param \Drupal\Core\Config\ConfigFactory $config_factory
   *   The config factory services.
@@ -79,7 +79,7 @@ class SocialEmbedUrlEmbedFilter extends UrlEmbedFilter {
    $plugin_id,
    $plugin_definition,
    UrlEmbedInterface $url_embed,
    Php $uuid,
    UuidInterface $uuid,
    ConfigFactory $config_factory,
    SocialEmbedHelper $embed_helper,
    AccountProxyInterface $current_user
+5 −5
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ namespace Drupal\social_embed\Service;
use Drupal\Core\Render\Renderer;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\filter\FilterProcessResult;
use Drupal\Component\Uuid\Php;
use Drupal\Component\Uuid\UuidInterface;

/**
 * Service class for Social Embed.
@@ -15,9 +15,9 @@ class SocialEmbedHelper {
  /**
   * Uuid generator.
   *
   * @var \Drupal\Component\Uuid\Php
   * @var \Drupal\Component\Uuid\UuidInterface
   */
  protected Php $uuidGenerator;
  protected UuidInterface $uuidGenerator;

  /**
   * Current user object.
@@ -36,14 +36,14 @@ class SocialEmbedHelper {
  /**
   * Constructor for SocialEmbedHelper.
   *
   * @param \Drupal\Component\Uuid\Php $uuid_generator
   * @param \Drupal\Component\Uuid\UuidInterface $uuid_generator
   *   The UUID generator.
   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
   *   Current user object.
   * @param \Drupal\Core\Render\Renderer $renderer
   *   Renderer services.
   */
  public function __construct(Php $uuid_generator, AccountProxyInterface $current_user, Renderer $renderer) {
  public function __construct(UuidInterface $uuid_generator, AccountProxyInterface $current_user, Renderer $renderer) {
    $this->uuidGenerator = $uuid_generator;
    $this->currentUser = $current_user;
    $this->renderer = $renderer;