diff --git a/core/core.api.php b/core/core.api.php index fb612f23db..4a9c0ba52a 100644 --- a/core/core.api.php +++ b/core/core.api.php @@ -2515,7 +2515,7 @@ function hook_validation_constraint_alter(array &$definitions) { * you should normally define as a constant in a separate static class (see * \Symfony\Component\HttpKernel\KernelEvents and * \Drupal\Core\Config\ConfigEvents for examples). The second argument is a - * \Drupal\Component\EventDispatcher\Event object; normally you will need to + * \\Symfony\Contracts\EventDispatcher\Event object; normally you will need to * extend this class, so that your event class can provide data to the event * subscribers. * diff --git a/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php b/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php index 0cf5669543..aee03dd435 100644 --- a/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php +++ b/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php @@ -106,7 +106,7 @@ public function dispatch($event/*, string $event_name = NULL*/) { // in the Symfony namespace or a different one, we have to assume those // will be updated by the dependency itself. Exclude the Drupal Event // bridge class as a special case, otherwise it's pointless. - elseif ($class_name !== 'Drupal\Component\EventDispatcher\Event' && strpos($class_name, 'Drupal') !== FALSE) { + elseif ($class_name !== 'Symfony\Contracts\EventDispatcher\Event' && strpos($class_name, 'Drupal') !== FALSE) { if (get_parent_class($event) === 'Symfony\Component\EventDispatcher\Event') { @trigger_error($deprecation_message, E_USER_DEPRECATED); } diff --git a/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php b/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php index 35fe0284e3..8905e7b2df 100644 --- a/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php +++ b/core/lib/Drupal/Core/Config/ConfigCollectionInfo.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Config; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Gets information on all the possible configuration collections. diff --git a/core/lib/Drupal/Core/Config/ConfigCrudEvent.php b/core/lib/Drupal/Core/Config/ConfigCrudEvent.php index 639e3031b4..84a29a13b8 100644 --- a/core/lib/Drupal/Core/Config/ConfigCrudEvent.php +++ b/core/lib/Drupal/Core/Config/ConfigCrudEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Config; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps a configuration event for event listeners. diff --git a/core/lib/Drupal/Core/Config/ConfigImporterEvent.php b/core/lib/Drupal/Core/Config/ConfigImporterEvent.php index 2c60e0306d..65614cc12c 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporterEvent.php +++ b/core/lib/Drupal/Core/Config/ConfigImporterEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Config; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; class ConfigImporterEvent extends Event { /** diff --git a/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php b/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php index 21ebf27e72..db9a1ff6c7 100644 --- a/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php +++ b/core/lib/Drupal/Core/Config/ConfigModuleOverridesEvent.php @@ -4,7 +4,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Language\LanguageInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Event object to allow configuration to be overridden by modules. diff --git a/core/lib/Drupal/Core/Config/Importer/MissingContentEvent.php b/core/lib/Drupal/Core/Config/Importer/MissingContentEvent.php index 4b3dce9fc4..646a585226 100644 --- a/core/lib/Drupal/Core/Config/Importer/MissingContentEvent.php +++ b/core/lib/Drupal/Core/Config/Importer/MissingContentEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Config\Importer; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps a configuration event for event listeners. diff --git a/core/lib/Drupal/Core/Config/StorageTransformEvent.php b/core/lib/Drupal/Core/Config/StorageTransformEvent.php index 7fd747bd41..7b1f766443 100644 --- a/core/lib/Drupal/Core/Config/StorageTransformEvent.php +++ b/core/lib/Drupal/Core/Config/StorageTransformEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Config; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Class StorageTransformEvent. diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index c8d7603062..ab8e563bab 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -4,7 +4,7 @@ use Composer\Autoload\ClassLoader; use Drupal\Component\Assertion\Handle; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Drupal\Component\FileCache\FileCacheFactory; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Cache\DatabaseBackend; diff --git a/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php index 621cdeb7e5..279ba8bcef 100644 --- a/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php @@ -63,7 +63,7 @@ public function __construct(LockBackendInterface $lock, MenuLinkManagerInterface /** * Rebuilds the menu links and deletes the local_task cache tag. * - * @param \Drupal\Component\EventDispatcher\Event $event + * @param \Symfony\Contracts\EventDispatcher\Event $event * The event object. */ public function onRouterRebuild($event) { diff --git a/core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php b/core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php index 41b520121f..ec3623d3ff 100644 --- a/core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php +++ b/core/lib/Drupal/Core/File/Event/FileUploadSanitizeNameEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\File\Event; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * An event during file upload that lets subscribers sanitize the filename. diff --git a/core/lib/Drupal/Core/Http/KernelEvent.php b/core/lib/Drupal/Core/Http/KernelEvent.php index 301f31aab3..c6dc7f1b0f 100644 --- a/core/lib/Drupal/Core/Http/KernelEvent.php +++ b/core/lib/Drupal/Core/Http/KernelEvent.php @@ -5,7 +5,7 @@ namespace Drupal\Core\Http; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\HttpKernelInterface; diff --git a/core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php b/core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php index b95ff18b55..f47853670e 100644 --- a/core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php +++ b/core/lib/Drupal/Core/Render/PageDisplayVariantSelectionEvent.php @@ -5,7 +5,7 @@ use Drupal\Core\Cache\RefinableCacheableDependencyInterface; use Drupal\Core\Cache\RefinableCacheableDependencyTrait; use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Event fired when rendering main content, to select a page display variant. diff --git a/core/lib/Drupal/Core/Routing/RouteBuildEvent.php b/core/lib/Drupal/Core/Routing/RouteBuildEvent.php index 326dd77ff5..4b8d6e59f6 100644 --- a/core/lib/Drupal/Core/Routing/RouteBuildEvent.php +++ b/core/lib/Drupal/Core/Routing/RouteBuildEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Routing; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Symfony\Component\Routing\RouteCollection; /** diff --git a/core/lib/Drupal/Core/Routing/RouteBuilder.php b/core/lib/Drupal/Core/Routing/RouteBuilder.php index 43dd1569b0..fd1cdb83e6 100644 --- a/core/lib/Drupal/Core/Routing/RouteBuilder.php +++ b/core/lib/Drupal/Core/Routing/RouteBuilder.php @@ -8,7 +8,7 @@ use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Lock\LockBackendInterface; use Drupal\Core\DestructableInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; diff --git a/core/lib/Drupal/Core/Routing/RoutingEvents.php b/core/lib/Drupal/Core/Routing/RoutingEvents.php index e719010419..83a3969753 100644 --- a/core/lib/Drupal/Core/Routing/RoutingEvents.php +++ b/core/lib/Drupal/Core/Routing/RoutingEvents.php @@ -48,11 +48,11 @@ final class RoutingEvents { * * This event gives modules the opportunity to perform some action after route * building has completed. The event listener receives a - * \Drupal\Component\EventDispatcher\Event instance. + * \Symfony\Contracts\EventDispatcher\Event instance. * * @Event * - * @see \Drupal\Component\EventDispatcher\Event + * @see \Symfony\Contracts\EventDispatcher\Event * @see \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber * @see \Drupal\Core\Routing\RouteBuilder::rebuild() * diff --git a/core/lib/Drupal/Core/Session/AccountSetEvent.php b/core/lib/Drupal/Core/Session/AccountSetEvent.php index 283f2c2c99..c72cb0074c 100644 --- a/core/lib/Drupal/Core/Session/AccountSetEvent.php +++ b/core/lib/Drupal/Core/Session/AccountSetEvent.php @@ -2,7 +2,7 @@ namespace Drupal\Core\Session; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Event fired when an account is set for the current session. diff --git a/core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php b/core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php index 423d89f2f8..f7f1167428 100644 --- a/core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php +++ b/core/modules/block_content/src/Event/BlockContentGetDependencyEvent.php @@ -4,7 +4,7 @@ use Drupal\block_content\BlockContentInterface; use Drupal\Core\Access\AccessibleInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Block content event to allow setting an access dependency. diff --git a/core/modules/config_translation/src/Event/ConfigMapperPopulateEvent.php b/core/modules/config_translation/src/Event/ConfigMapperPopulateEvent.php index 8ba4786544..eae68a7996 100644 --- a/core/modules/config_translation/src/Event/ConfigMapperPopulateEvent.php +++ b/core/modules/config_translation/src/Event/ConfigMapperPopulateEvent.php @@ -4,7 +4,7 @@ use Drupal\config_translation\ConfigMapperInterface; use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Provides a class for events related to configuration translation mappers. diff --git a/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php b/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php index 5aebcfde8d..7244dd7676 100644 --- a/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php +++ b/core/modules/jsonapi/src/ResourceType/ResourceTypeBuildEvent.php @@ -4,7 +4,7 @@ use Drupal\Component\Assertion\Inspector; use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * An event used to configure the construction of a JSON:API resource type. diff --git a/core/modules/language/src/Config/LanguageConfigOverrideCrudEvent.php b/core/modules/language/src/Config/LanguageConfigOverrideCrudEvent.php index ec2480d701..5580ee1f6c 100644 --- a/core/modules/language/src/Config/LanguageConfigOverrideCrudEvent.php +++ b/core/modules/language/src/Config/LanguageConfigOverrideCrudEvent.php @@ -2,7 +2,7 @@ namespace Drupal\language\Config; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Provides a language override event for event listeners. diff --git a/core/modules/layout_builder/src/Event/PrepareLayoutEvent.php b/core/modules/layout_builder/src/Event/PrepareLayoutEvent.php index c0795be61c..adf93da0f0 100644 --- a/core/modules/layout_builder/src/Event/PrepareLayoutEvent.php +++ b/core/modules/layout_builder/src/Event/PrepareLayoutEvent.php @@ -3,7 +3,7 @@ namespace Drupal\layout_builder\Event; use Drupal\layout_builder\SectionStorageInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Event fired in #pre_render of \Drupal\layout_builder\Element\LayoutBuilder. diff --git a/core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php b/core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php index 70906f3166..1b3575632d 100644 --- a/core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php +++ b/core/modules/layout_builder/src/Event/SectionComponentBuildRenderArrayEvent.php @@ -4,7 +4,7 @@ use Drupal\Core\Cache\CacheableResponseTrait; use Drupal\layout_builder\SectionComponent; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Event fired when a section component's render array is being built. diff --git a/core/modules/locale/src/LocaleEvent.php b/core/modules/locale/src/LocaleEvent.php index 8851dddc46..cb3940a256 100644 --- a/core/modules/locale/src/LocaleEvent.php +++ b/core/modules/locale/src/LocaleEvent.php @@ -2,7 +2,7 @@ namespace Drupal\locale; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Defines a Locale event. diff --git a/core/modules/migrate/src/Event/EventBase.php b/core/modules/migrate/src/Event/EventBase.php index b999de229c..d3a44cba69 100644 --- a/core/modules/migrate/src/Event/EventBase.php +++ b/core/modules/migrate/src/Event/EventBase.php @@ -4,7 +4,7 @@ use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\MigrateMessageInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; class EventBase extends Event { diff --git a/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php b/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php index bd831cc27c..f85387bd26 100644 --- a/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php +++ b/core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php @@ -3,7 +3,7 @@ namespace Drupal\migrate\Event; use Drupal\migrate\Plugin\MigrationInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps an idmap message event for event listeners. diff --git a/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php b/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php index c5a85950ca..b32a2aaed7 100644 --- a/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php +++ b/core/modules/migrate/src/Event/MigrateMapDeleteEvent.php @@ -3,7 +3,7 @@ namespace Drupal\migrate\Event; use Drupal\migrate\Plugin\MigrateIdMapInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps a migrate map delete event for event listeners. diff --git a/core/modules/migrate/src/Event/MigrateMapSaveEvent.php b/core/modules/migrate/src/Event/MigrateMapSaveEvent.php index d42823bcb0..76c2204324 100644 --- a/core/modules/migrate/src/Event/MigrateMapSaveEvent.php +++ b/core/modules/migrate/src/Event/MigrateMapSaveEvent.php @@ -3,7 +3,7 @@ namespace Drupal\migrate\Event; use Drupal\migrate\Plugin\MigrateIdMapInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps a migrate map save event for event listeners. diff --git a/core/modules/migrate/src/Event/MigrateRollbackEvent.php b/core/modules/migrate/src/Event/MigrateRollbackEvent.php index b04fab4267..fd6cde20cc 100644 --- a/core/modules/migrate/src/Event/MigrateRollbackEvent.php +++ b/core/modules/migrate/src/Event/MigrateRollbackEvent.php @@ -3,7 +3,7 @@ namespace Drupal\migrate\Event; use Drupal\migrate\Plugin\MigrationInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps a pre- or post-rollback event for event listeners. diff --git a/core/modules/migrate/src/Event/MigrateRowDeleteEvent.php b/core/modules/migrate/src/Event/MigrateRowDeleteEvent.php index 2eadfeeb18..13ffa2d580 100644 --- a/core/modules/migrate/src/Event/MigrateRowDeleteEvent.php +++ b/core/modules/migrate/src/Event/MigrateRowDeleteEvent.php @@ -3,7 +3,7 @@ namespace Drupal\migrate\Event; use Drupal\migrate\Plugin\MigrationInterface; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Wraps a row deletion event for event listeners. diff --git a/core/modules/user/src/Event/UserFloodEvent.php b/core/modules/user/src/Event/UserFloodEvent.php index c45bf80adc..524bd43656 100644 --- a/core/modules/user/src/Event/UserFloodEvent.php +++ b/core/modules/user/src/Event/UserFloodEvent.php @@ -2,7 +2,7 @@ namespace Drupal\user\Event; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; /** * Provides a user flood event for event listeners. diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php index b91ce83f1b..2d86ff5fad 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -119,7 +119,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o parent::init($view, $display, $options); if ($this->usesRowPlugin() && $display->getOption('row')) { - $this->view->rowPlugin = $display->getPlugin('row'); + $this->view->rowPlugin = $view->getRowPlugin(); } $this->options += [ diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 5cd0938bad..948db09575 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -218,6 +218,11 @@ class ViewExecutable { * The current used style plugin. * * @var \Drupal\views\Plugin\views\style\StylePluginBase + * + * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. + * Use getStylePlugin() instead to get this property. + * + * @see https://www.drupal.org/project/drupal/issues/2719173 */ public $style_plugin; @@ -225,6 +230,11 @@ class ViewExecutable { * The current used row plugin, if the style plugin supports row plugins. * * @var \Drupal\views\Plugin\views\row\RowPluginBase + * + * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. + * Use getRowPlugin() instead to get this property. + * + * @see https://www.drupal.org/project/drupal/issues/2719173 */ public $rowPlugin; @@ -856,8 +866,23 @@ public function newDisplay($plugin_id = 'page', $title = NULL, $id = NULL) { * * @return \Drupal\views\Plugin\views\style\StylePluginBase * The current style plugin. + * + * @deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. + * Use getStylePlugin() instead. + * + * @see https://www.drupal.org/project/drupal/issues/2719173 */ public function getStyle() { + return $this->getStylePlugin(); + } + + /** + * Gets the current style plugin. + * + * @return \Drupal\views\Plugin\views\style\StylePluginBase + * The current style plugin. + */ + public function getStylePlugin() { if (!isset($this->style_plugin)) { $this->initStyle(); } @@ -865,6 +890,20 @@ public function getStyle() { return $this->style_plugin; } + /** + * Gets the current row plugin. + * + * @return \Drupal\views\Plugin\views\row\RowPluginBase + * The current row plugin. + */ + public function getRowPlugin() { + if (!isset($this->rowPlugin)) { + $this->rowPlugin = $this->display_handler->getPlugin('row'); + } + + return $this->rowPlugin; + } + /** * Finds and initializes the style plugin. * diff --git a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php index f60e2b9a47..2f80c6f33d 100644 --- a/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php +++ b/core/tests/Drupal/Tests/Component/EventDispatcher/ContainerAwareEventDispatcherTest.php @@ -10,7 +10,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\Event as SymfonyEvent; use Symfony\Component\EventDispatcher\GenericEvent; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; /** diff --git a/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php b/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php index da61174387..c1da40737d 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/RoutePreloaderTest.php @@ -4,7 +4,7 @@ use Drupal\Core\Routing\RoutePreloader; use Drupal\Tests\UnitTestCase; -use Drupal\Component\EventDispatcher\Event; +use Symfony\Contracts\EventDispatcher\Event; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection;