Revert "Issue #3161983 by Pooja Ganjage, sanjayk, catch, longwave, daffie, dww, Gábor Hojtsy: [Symfony 6] Update EventDispatcherInterface type hints in constructors"

This reverts commit a9cee683f2.
merge-requests/184/head
catch 2020-12-24 14:24:40 +00:00
parent bdf6131d9f
commit 7e79ca91db
54 changed files with 122 additions and 122 deletions

View File

@ -2501,7 +2501,7 @@ function hook_validation_constraint_alter(array &$definitions) {
*
* @section sec_dispatch Dispatching events
* To dispatch an event, call the
* \Symfony\Contracts\EventDispatcher\EventDispatcherInterface::dispatch()
* \Symfony\Component\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

View File

@ -4,7 +4,7 @@ namespace Drupal\Component\EventDispatcher;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\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 @@ class ContainerAwareEventDispatcher implements EventDispatcherInterface {
}
}
elseif (\is_string($event) && (NULL === $event_name || $event_name instanceof ContractsEvent || $event_name instanceof Event)) {
@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);
@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);
$swap = $event;
$event = $event_name ?? new Event();
$event_name = $swap;

View File

@ -10,7 +10,7 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Utility\UnroutedUrlAssemblerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\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\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\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\Contracts\EventDispatcher\EventDispatcherInterface $dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
* The tempstore factory.
* @param \Drupal\Core\Utility\UnroutedUrlAssemblerInterface $url_assembler
* The unrouted URL assembler service.

View File

@ -4,7 +4,7 @@ namespace Drupal\Core\Config;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Cache\Cache;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\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\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\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\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\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.

View File

@ -4,7 +4,7 @@ namespace Drupal\Core\Config;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Cache\Cache;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\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\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\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\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* An event dispatcher instance to use for configuration events.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
* The typed configuration manager.

View File

@ -13,7 +13,7 @@ use Drupal\Core\Entity\EntityStorageException;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines a configuration importer.
@ -53,7 +53,7 @@ class ConfigImporter {
/**
* The event dispatcher used to notify subscribers.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -172,7 +172,7 @@ class ConfigImporter {
* @param \Drupal\Core\Config\StorageComparerInterface $storage_comparer
* A storage comparer object used to determine configuration changes and
* access the source and target storage objects.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher used to notify subscribers of config import events.
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* The configuration manager.

View File

@ -5,7 +5,7 @@ namespace Drupal\Core\Config;
use Drupal\Component\Utility\Crypt;
use Drupal\Core\Config\Entity\ConfigDependencyManager;
use Drupal\Core\Installer\InstallerKernel;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class ConfigInstaller implements ConfigInstallerInterface {
@ -40,7 +40,7 @@ class ConfigInstaller implements ConfigInstallerInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -76,7 +76,7 @@ class ConfigInstaller implements ConfigInstallerInterface {
* The typed configuration manager.
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* The configuration manager.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param string $install_profile
* The name of the currently active installation profile.

View File

@ -12,7 +12,7 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Serialization\Yaml;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* The ConfigManager provides helper functions for the configuration system.
@ -59,7 +59,7 @@ class ConfigManager implements ConfigManagerInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -90,7 +90,7 @@ class ConfigManager implements ConfigManagerInterface {
* The string translation service.
* @param \Drupal\Core\Config\StorageInterface $active_storage
* The active configuration storage.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository
* The entity repository.

View File

@ -4,7 +4,7 @@ namespace Drupal\Core\Config;
use Drupal\Core\Database\Connection;
use Drupal\Core\Lock\LockBackendInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* The export storage manager dispatches an event for the export storage.
@ -39,7 +39,7 @@ final class ExportStorageManager implements StorageManagerInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -57,7 +57,7 @@ final class ExportStorageManager implements StorageManagerInterface {
* The active config storage to prime the export storage.
* @param \Drupal\Core\Database\Connection $connection
* The database connection.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Lock\LockBackendInterface $lock
* The used lock backend instance.

View File

@ -4,7 +4,7 @@ namespace Drupal\Core\Config;
use Drupal\Core\Database\Connection;
use Drupal\Core\Lock\LockBackendInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* The import storage transformer helps to use the configuration management api.
@ -26,7 +26,7 @@ final class ImportStorageTransformer {
/**
* The event dispatcher to get changes to the configuration.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -56,7 +56,7 @@ final class ImportStorageTransformer {
/**
* ImportStorageTransformer constructor.
*
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Database\Connection $connection
* The database connection.

View File

@ -2,7 +2,7 @@
namespace Drupal\Core\Entity;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Reacts to entity type CRUD on behalf of the Entity system.
@ -28,7 +28,7 @@ class EntityTypeListener implements EntityTypeListenerInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -46,7 +46,7 @@ class EntityTypeListener implements EntityTypeListenerInterface {
* The entity type manager.
* @param \Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager
* The entity field manager.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository
* The entity last installed schema repository.

View File

@ -6,7 +6,7 @@ use Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface;
use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\FieldableEntityStorageInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Reacts to field storage definition CRUD on behalf of the Entity system.
@ -25,7 +25,7 @@ class FieldStorageDefinitionListener implements FieldStorageDefinitionListenerIn
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -55,7 +55,7 @@ class FieldStorageDefinitionListener implements FieldStorageDefinitionListenerIn
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository
* The entity last installed schema repository.

View File

@ -17,7 +17,7 @@ use Drupal\Core\Render\Element;
use Drupal\Core\Render\ElementInfoManagerInterface;
use Drupal\Core\Security\TrustedCallbackInterface;
use Drupal\Core\Theme\ThemeManagerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\FileBag;
use Symfony\Component\HttpFoundation\ParameterBag;
use Symfony\Component\HttpFoundation\RequestStack;
@ -40,7 +40,7 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -157,7 +157,7 @@ class FormBuilder implements FormBuilderInterface, FormValidatorInterface, FormS
* The form cache.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* The request stack.

View File

@ -16,7 +16,7 @@ use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Render\RenderEvents;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Theme\ThemeManagerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
/**
@ -48,7 +48,7 @@ class HtmlRenderer implements MainContentRendererInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
/**
@ -95,7 +95,7 @@ class HtmlRenderer implements MainContentRendererInterface {
* The title resolver.
* @param \Drupal\Component\Plugin\PluginManagerInterface $display_variant_manager
* The display variant manager.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.

View File

@ -9,7 +9,7 @@ use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\DestructableInterface;
use Drupal\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
@ -35,7 +35,7 @@ class RouteBuilder implements RouteBuilderInterface, DestructableInterface {
/**
* The event dispatcher to notify of routes.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $dispatcher;
@ -88,7 +88,7 @@ class RouteBuilder implements RouteBuilderInterface, DestructableInterface {
* The matcher dumper used to store the route information.
* @param \Drupal\Core\Lock\LockBackendInterface $lock
* The lock backend.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
* The event dispatcher to notify of routes.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler.

View File

@ -3,7 +3,7 @@
namespace Drupal\Core\Session;
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* A proxied implementation of AccountInterface.
@ -37,14 +37,14 @@ class AccountProxy implements AccountProxyInterface {
/**
* Event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
/**
* AccountProxy constructor.
*
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $eventDispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher
* Event dispatcher.
*/
public function __construct(EventDispatcherInterface $eventDispatcher) {

View File

@ -11,7 +11,7 @@ use Drupal\Core\Asset\AttachedAssetsInterface;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Render\HtmlResponse;
use Drupal\Core\Render\RendererInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
@ -194,7 +194,7 @@ class BigPipe {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -216,7 +216,7 @@ class BigPipe {
* The request stack.
* @param \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel
* The HTTP kernel.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory.

View File

@ -8,7 +8,7 @@ use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Render\HtmlResponse;
use Drupal\Core\Render\RendererInterface;
use Drupal\Tests\UnitTestCase;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\HttpKernelInterface;

View File

@ -11,7 +11,7 @@ use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\Core\Session\AccountInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines the access control handler for the custom block entity type.
@ -23,7 +23,7 @@ class BlockContentAccessControlHandler extends EntityAccessControlHandler implem
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -32,7 +32,7 @@ class BlockContentAccessControlHandler extends EntityAccessControlHandler implem
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
* The event dispatcher.
*/
public function __construct(EntityTypeInterface $entity_type, EventDispatcherInterface $dispatcher) {

View File

@ -24,7 +24,7 @@ use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Serialization\Yaml;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Provides a form for importing a single configuration file.
@ -57,7 +57,7 @@ class ConfigSingleImportForm extends ConfirmFormBase {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -133,7 +133,7 @@ class ConfigSingleImportForm extends ConfirmFormBase {
* The config storage.
* @param \Drupal\Core\Render\RendererInterface $renderer
* The renderer service.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher used to notify subscribers of config import events.
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* The configuration manager.

View File

@ -19,7 +19,7 @@ use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\Config\StorageComparer;
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Url;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
@ -60,7 +60,7 @@ class ConfigSync extends FormBase {
/**
* Event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -131,7 +131,7 @@ class ConfigSync extends FormBase {
* The snapshot storage.
* @param \Drupal\Core\Lock\LockBackendInterface $lock
* The lock object.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* Event dispatcher.
* @param \Drupal\Core\Config\ConfigManagerInterface $config_manager
* Configuration manager.

View File

@ -13,7 +13,7 @@ use Drupal\Core\StringTranslation\TranslationInterface;
use Drupal\Core\Url;
use Drupal\locale\LocaleConfigManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\Route;
/**
@ -74,7 +74,7 @@ class ConfigEntityMapper extends ConfigNamesMapper {
* The entity type manager.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public function __construct($plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $translation_manager, EntityTypeManagerInterface $entity_type_manager, LanguageManagerInterface $language_manager, EventDispatcherInterface $event_dispatcher = NULL) {

View File

@ -17,7 +17,7 @@ use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Url;
use Drupal\locale\LocaleConfigManager;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
@ -92,7 +92,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -125,7 +125,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con
* The string translation manager.
* @param \Drupal\Core\Language\LanguageManagerInterface $language_manager
* The language manager.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* (optional) The event dispatcher.
*
* @throws \Symfony\Component\Routing\Exception\RouteNotFoundException

View File

@ -52,7 +52,7 @@ class ConfigEntityMapperTest extends UnitTestCase {
/**
* The mocked event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -86,7 +86,7 @@ class ConfigEntityMapperTest extends UnitTestCase {
$this->languageManager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface');
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->configEntityMapper = new ConfigEntityMapper(
'configurable_language',

View File

@ -38,7 +38,7 @@ class ConfigFieldMapperTest extends UnitTestCase {
/**
* The mocked event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -61,7 +61,7 @@ class ConfigFieldMapperTest extends UnitTestCase {
->disableOriginalConstructor()
->getMock();
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->configFieldMapper = new ConfigFieldMapper(
'node_fields',

View File

@ -91,7 +91,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
/**
* The mocked event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -129,7 +129,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
$this->languageManager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface');
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->configNamesMapper = new TestConfigNamesMapper(
'system.site_information_settings',

View File

@ -16,7 +16,7 @@ use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\Core\Installer\InstallerKernel;
use Drupal\Core\TypedData\DataReferenceTargetDefinition;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpKernel\Exception\PreconditionFailedHttpException;
/**
@ -72,7 +72,7 @@ class ResourceTypeRepository implements ResourceTypeRepositoryInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -102,7 +102,7 @@ class ResourceTypeRepository implements ResourceTypeRepositoryInterface {
* The entity field manager.
* @param \Drupal\Core\Cache\CacheBackendInterface $cache
* The cache backend.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher
* The event dispatcher.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityTypeBundleInfoInterface $entity_bundle_info, EntityFieldManagerInterface $entity_field_manager, CacheBackendInterface $cache, EventDispatcherInterface $dispatcher) {

View File

@ -11,7 +11,7 @@ use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Language\LanguageDefault;
use Drupal\Core\Language\LanguageInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
@ -48,7 +48,7 @@ class LanguageConfigFactoryOverride extends ConfigFactoryOverrideBase implements
/**
* An event dispatcher instance to use for configuration events.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -64,7 +64,7 @@ class LanguageConfigFactoryOverride extends ConfigFactoryOverrideBase implements
*
* @param \Drupal\Core\Config\StorageInterface $storage
* The configuration storage engine.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* An event dispatcher instance to use for configuration events.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
* The typed configuration manager.

View File

@ -6,7 +6,7 @@ use Drupal\Core\Cache\Cache;
use Drupal\Core\Config\StorableConfigBase;
use Drupal\Core\Config\StorageInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines language configuration overrides.
@ -18,7 +18,7 @@ class LanguageConfigOverride extends StorableConfigBase {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -32,7 +32,7 @@ class LanguageConfigOverride extends StorableConfigBase {
* configuration override.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typed_config
* The typed configuration manager service.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public function __construct($name, StorageInterface $storage, TypedConfigManagerInterface $typed_config, EventDispatcherInterface $event_dispatcher) {

View File

@ -30,7 +30,7 @@ class LanguageConfigOverrideTest extends UnitTestCase {
/**
* Event Dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -53,7 +53,7 @@ class LanguageConfigOverrideTest extends UnitTestCase {
*/
protected function setUp(): void {
$this->storage = $this->createMock('Drupal\Core\Config\StorageInterface');
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->typedConfig = $this->createMock('\Drupal\Core\Config\TypedConfigManagerInterface');
$this->configTranslation = new LanguageConfigOverride('config.test', $this->storage, $this->typedConfig, $this->eventDispatcher);
$this->cacheTagsInvalidator = $this->createMock('Drupal\Core\Cache\CacheTagsInvalidatorInterface');

View File

@ -14,7 +14,7 @@ use Drupal\layout_builder\LayoutBuilderEvents;
use Drupal\layout_builder\LayoutBuilderHighlightTrait;
use Drupal\layout_builder\SectionStorageInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines a render element for building the Layout Builder UI.
@ -33,7 +33,7 @@ class LayoutBuilder extends RenderElement implements ContainerFactoryPluginInter
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -46,7 +46,7 @@ class LayoutBuilder extends RenderElement implements ContainerFactoryPluginInter
* The plugin ID for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher service.
* @param \Drupal\Core\Messenger\MessengerInterface|null $messenger
* The messenger service. This is no longer used and will be removed in

View File

@ -272,7 +272,7 @@ class SectionComponent {
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
protected function eventDispatcher() {

View File

@ -6,7 +6,7 @@ use Drupal\Core\Messenger\MessengerInterface;
use Drupal\KernelTests\KernelTestBase;
use Drupal\layout_builder\Element\LayoutBuilder;
use Drupal\layout_builder\LayoutTempstoreRepositoryInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Tests the deprecation notices of the layout builder element.

View File

@ -14,7 +14,7 @@ use Drupal\migrate\Event\MigrateRowDeleteEvent;
use Drupal\migrate\Exception\RequirementsException;
use Drupal\migrate\Plugin\MigrateIdMapInterface;
use Drupal\migrate\Plugin\MigrationInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines a migrate executable class.
@ -77,7 +77,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -97,7 +97,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
* The migration to run.
* @param \Drupal\migrate\MigrateMessageInterface $message
* (optional) The migrate message service.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* (optional) The event dispatcher.
*
* @throws \Drupal\migrate\MigrateException
@ -135,7 +135,7 @@ class MigrateExecutable implements MigrateExecutableInterface {
/**
* Gets the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @return \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected function getEventDispatcher() {
if (!$this->eventDispatcher) {

View File

@ -19,7 +19,7 @@ use Drupal\migrate\Event\MigrateEvents;
use Drupal\migrate\Event\MigrateMapSaveEvent;
use Drupal\migrate\Event\MigrateMapDeleteEvent;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines the sql based ID map implementation.
@ -39,7 +39,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryP
/**
* An event dispatcher instance to use for map events.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -154,7 +154,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryP
* The configuration for the plugin.
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration to do.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EventDispatcherInterface $event_dispatcher) {

View File

@ -7,7 +7,7 @@ use Drupal\Core\Database\DatabaseExceptionWrapper;
use Drupal\Tests\migrate\Kernel\MigrateTestBase;
use Drupal\Tests\migrate\Unit\TestSqlIdMap;
use Drupal\migrate\MigrateException;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Tests that the migrate map table is created.
@ -26,7 +26,7 @@ class SqlTest extends MigrateTestBase {
/**
* Prophesized event dispatcher.
*
* @var object|\Prophecy\Prophecy\ProphecySubjectInterface|\Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var object|\Prophecy\Prophecy\ProphecySubjectInterface|\Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;

View File

@ -52,7 +52,7 @@ class MigrateExecutableTest extends MigrateTestCase {
parent::setUp();
$this->migration = $this->getMigration();
$this->message = $this->createMock('Drupal\migrate\MigrateMessageInterface');
$event_dispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$event_dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->executable = new TestMigrateExecutable($this->migration, $this->message, $event_dispatcher);
$this->executable->setStringTranslation($this->getStringTranslationStub());
}

View File

@ -444,8 +444,8 @@ class MigrateSourceTest extends MigrateTestCase {
protected function getMigrateExecutable($migration) {
/** @var \Drupal\migrate\MigrateMessageInterface $message */
$message = $this->createMock('Drupal\migrate\MigrateMessageInterface');
/** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher */
$event_dispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
/** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher */
$event_dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
return new MigrateExecutable($migration, $message, $event_dispatcher);
}

View File

@ -230,8 +230,8 @@ class MigrateSqlIdMapEnsureTablesTest extends MigrateTestCase {
$migration->expects($this->any())
->method('getDestinationPlugin')
->willReturn($plugin);
/** @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher */
$event_dispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
/** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher */
$event_dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$map = new TestSqlIdMap($database, [], 'sql', [], $migration, $event_dispatcher);
$map->getDatabase();
}

View File

@ -110,7 +110,7 @@ class MigrateSqlIdMapTest extends MigrateTestCase {
$migration
->method('getDestinationPlugin')
->willReturn($plugin);
$event_dispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$event_dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$id_map = new TestSqlIdMap($this->database, [], 'sql', [], $migration, $event_dispatcher);
$migration

View File

@ -6,7 +6,7 @@ use Drupal\Core\Database\Connection;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\MigrateException;
use Drupal\migrate\Plugin\migrate\id_map\Sql;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines a SQL ID map for use in tests.
@ -26,7 +26,7 @@ class TestSqlIdMap extends Sql implements \Iterator {
* The configuration for the plugin.
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
* The migration to do.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher service.
*/
public function __construct(Connection $database, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EventDispatcherInterface $event_dispatcher) {

View File

@ -8,7 +8,7 @@ use Drupal\migrate\Plugin\migrate\process\Get;
use Drupal\migrate\Plugin\migrate\process\SubProcess;
use Drupal\migrate\Row;
use Drupal\Tests\migrate\Unit\MigrateTestCase;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Tests the sub_process process plugin.

View File

@ -5,7 +5,7 @@ namespace Drupal\user;
use Drupal\user\Event\UserEvents;
use Drupal\user\Event\UserFloodEvent;
use Drupal\Core\Flood\FloodInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\RequestStack;
/**
@ -25,7 +25,7 @@ class UserFloodControl implements UserFloodControlInterface {
/**
* Event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;
@ -41,7 +41,7 @@ class UserFloodControl implements UserFloodControlInterface {
*
* @param \Drupal\Core\Flood\FloodInterface $flood
* The flood service.
* @param \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher service.
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* The request stack used to retrieve the current request.

View File

@ -43,7 +43,7 @@ class ViewsEntitySchemaSubscriberIntegrationTest extends ViewsKernelTestBase {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $eventDispatcher;

View File

@ -151,7 +151,7 @@ class ContainerAwareEventDispatcherTest extends TestCase {
* @group legacy
*/
public function testDispatchArgumentOrderDeprecation() {
$this->expectDeprecation('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');
$this->expectDeprecation('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');
$container = new ContainerBuilder();
$dispatcher = new ContainerAwareEventDispatcher($container, []);
$dispatcher->dispatch('foo');

View File

@ -30,7 +30,7 @@ class ConfigFactoryTest extends UnitTestCase {
/**
* Event Dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -53,7 +53,7 @@ class ConfigFactoryTest extends UnitTestCase {
*/
protected function setUp(): void {
$this->storage = $this->createMock('Drupal\Core\Config\StorageInterface');
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->typedConfig = $this->createMock('\Drupal\Core\Config\TypedConfigManagerInterface');
$this->configFactory = new ConfigFactory($this->storage, $this->eventDispatcher, $this->typedConfig);

View File

@ -37,7 +37,7 @@ class ConfigTest extends UnitTestCase {
/**
* Event Dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -57,7 +57,7 @@ class ConfigTest extends UnitTestCase {
protected function setUp(): void {
$this->storage = $this->createMock('Drupal\Core\Config\StorageInterface');
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->typedConfig = $this->createMock('\Drupal\Core\Config\TypedConfigManagerInterface');
$this->config = new Config('config.test', $this->storage, $this->eventDispatcher, $this->typedConfig);
$this->cacheTagsInvalidator = $this->createMock('Drupal\Core\Cache\CacheTagsInvalidatorInterface');

View File

@ -22,7 +22,7 @@ class ImmutableConfigTest extends UnitTestCase {
protected function setUp(): void {
parent::setUp();
$storage = $this->createMock('Drupal\Core\Config\StorageInterface');
$event_dispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$event_dispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$typed_config = $this->createMock('Drupal\Core\Config\TypedConfigManagerInterface');
$this->config = new ImmutableConfig('test', $storage, $event_dispatcher, $typed_config);
}

View File

@ -89,7 +89,7 @@ class EntityFieldManagerTest extends UnitTestCase {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\Prophecy\Prophecy\ProphecyInterface
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\Prophecy\Prophecy\ProphecyInterface
*/
protected $eventDispatcher;

View File

@ -115,7 +115,7 @@ abstract class FormTestBase extends UnitTestCase {
/**
* The event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $eventDispatcher;
@ -174,7 +174,7 @@ abstract class FormTestBase extends UnitTestCase {
$this->account = $this->createMock('Drupal\Core\Session\AccountInterface');
$this->themeManager = $this->createMock('Drupal\Core\Theme\ThemeManagerInterface');
$this->request = Request::createFromGlobals();
$this->eventDispatcher = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->eventDispatcher = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->requestStack = new RequestStack();
$this->requestStack->push($this->request);
$this->logger = $this->createMock('Drupal\Core\Logger\LoggerChannelInterface');

View File

@ -15,7 +15,7 @@ class ContainerDerivativeDiscoveryDecoratorTest extends UnitTestCase {
* @covers ::getDefinitions
*/
public function testGetDefinitions() {
$example_service = $this->createMock('Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$example_service = $this->createMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
$example_container = $this->getMockBuilder('Symfony\Component\DependencyInjection\ContainerBuilder')
->setMethods(['get'])
->getMock();

View File

@ -4,7 +4,7 @@ namespace Drupal\Tests\Core\Plugin\Discovery;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* Defines container test derivative discovery.
@ -14,7 +14,7 @@ class TestContainerDerivativeDiscovery extends TestDerivativeDiscovery implement
/**
* Constructs a TestContainerDerivativeDiscovery object.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface $example_service
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface $example_service
* Some service.
*/
public function __construct(EventDispatcherInterface $example_service) {

View File

@ -47,7 +47,7 @@ class RouteBuilderTest extends UnitTestCase {
/**
* The mocked event dispatcher.
*
* @var \Symfony\Contracts\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface|\PHPUnit\Framework\MockObject\MockObject
*/
protected $dispatcher;
@ -80,7 +80,7 @@ class RouteBuilderTest extends UnitTestCase {
protected function setUp(): void {
$this->dumper = $this->createMock('Drupal\Core\Routing\MatcherDumperInterface');
$this->lock = $this->createMock('Drupal\Core\Lock\LockBackendInterface');
$this->dispatcher = $this->createMock('\Symfony\Contracts\EventDispatcher\EventDispatcherInterface');
$this->dispatcher = $this->createMock('\Symfony\Component\EventDispatcher\EventDispatcherInterface');
$this->moduleHandler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
$this->controllerResolver = $this->createMock('Drupal\Core\Controller\ControllerResolverInterface');
$this->yamlDiscovery = $this->getMockBuilder('\Drupal\Core\Discovery\YamlDiscovery')

View File

@ -7,7 +7,7 @@ use Drupal\Core\Session\AccountProxy;
use Drupal\Tests\UnitTestCase;
use Prophecy\Argument;
use Symfony\Contracts\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
* @coversDefaultClass \Drupal\Core\Session\AccountProxy