Commit a9cee683 authored by catch's avatar catch
Browse files

Issue #3161983 by Pooja Ganjage, sanjayk, catch, longwave, daffie, dww, Gábor...

Issue #3161983 by Pooja Ganjage, sanjayk, catch, longwave, daffie, dww, Gábor Hojtsy: [Symfony 6] Update EventDispatcherInterface type hints in constructors
parent e66a3860
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2501,7 +2501,7 @@ function hook_validation_constraint_alter(array &$definitions) {
 *
 * @section sec_dispatch Dispatching events
 * To dispatch an event, call the
 * \Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch()
 * \Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch()
 * method on the 'event_dispatcher' service (see the
 * @link container Services topic @endlink for more information about how to
 * interact with services). The first argument is the unique event name, which
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Contracts\EventDispatcher\Event as ContractsEvent;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface as ContractsEventDispatcherInterface;
@@ -113,7 +113,7 @@ public function dispatch($event/*, string $event_name = NULL*/) {
      }
    }
    elseif (\is_string($event) && (NULL === $event_name || $event_name instanceof ContractsEvent || $event_name instanceof Event)) {
      @trigger_error('Calling the Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407', E_USER_DEPRECATED);
      @trigger_error('Calling the Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch() method with a string event name as the first argument is deprecated in drupal:9.1.0, an Event object will be required instead in drupal:10.0.0. See https://www.drupal.org/node/3154407', E_USER_DEPRECATED);
      $swap = $event;
      $event = $event_name ?? new Event();
      $event_name = $swap;
+3 −3
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Utility\UnroutedUrlAssemblerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpKernel\KernelEvents;

@@ -28,7 +28,7 @@ class GotoAction extends ConfigurableActionBase implements ContainerFactoryPlugi
  /**
   * The event dispatcher service.
   *
   * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
   * @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
   */
  protected $dispatcher;

@@ -48,7 +48,7 @@ class GotoAction extends ConfigurableActionBase implements ContainerFactoryPlugi
   *   The plugin ID for the plugin instance.
   * @param mixed $plugin_definition
   *   The plugin implementation definition.
   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
   * @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $dispatcher
   *   The tempstore factory.
   * @param \Drupal\Core\Utility\UnroutedUrlAssemblerInterface $url_assembler
   *   The unrouted URL assembler service.
+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Cache\Cache;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

/**
 * Defines the default configuration object.
@@ -21,7 +21,7 @@ class Config extends StorableConfigBase {
  /**
   * An event dispatcher instance to use for configuration events.
   *
   * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
   * @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
   */
  protected $eventDispatcher;

@@ -57,7 +57,7 @@ class Config extends StorableConfigBase {
   * @param \Drupal\Core\Config\StorageInterface $storage
   *   A storage object to use for reading and writing the
   *   configuration data.
   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
   * @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
   *   An event dispatcher instance to use for configuration events.
   * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
   *   The typed configuration manager service.
+3 −3
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@

use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Cache\Cache;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
@@ -34,7 +34,7 @@ class ConfigFactory implements ConfigFactoryInterface, EventSubscriberInterface
  /**
   * An event dispatcher instance to use for configuration events.
   *
   * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
   * @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
   */
  protected $eventDispatcher;

@@ -64,7 +64,7 @@ class ConfigFactory implements ConfigFactoryInterface, EventSubscriberInterface
   *
   * @param \Drupal\Core\Config\StorageInterface $storage
   *   The configuration storage engine.
   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
   * @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
   *   An event dispatcher instance to use for configuration events.
   * @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
   *   The typed configuration manager.
Loading