diff --git a/core/modules/announcements_feed/announcements_feed.services.yml b/core/modules/announcements_feed/announcements_feed.services.yml index 39ec48442c078e2ba4d99cad7b21c230501f929f..408837cdee07ed374c9221481c23205a778ce0c7 100644 --- a/core/modules/announcements_feed/announcements_feed.services.yml +++ b/core/modules/announcements_feed/announcements_feed.services.yml @@ -6,6 +6,7 @@ services: announcements_feed.fetcher: class: Drupal\announcements_feed\AnnounceFetcher arguments: ['@http_client', '@config.factory', '@keyvalue.expirable', '@logger.channel.announcements_feed', '%announcements_feed.feed_json_url%'] + Drupal\announcements_feed\AnnounceFetcher: '@announcements_feed.fetcher' logger.channel.announcements_feed: parent: logger.channel_base arguments: ['announcements_feed'] diff --git a/core/modules/ban/ban.services.yml b/core/modules/ban/ban.services.yml index 7baeaa9b748055c604115917335760b877550fb8..e23f62c772e59a33106b3b970d063e3617ac80f3 100644 --- a/core/modules/ban/ban.services.yml +++ b/core/modules/ban/ban.services.yml @@ -4,6 +4,7 @@ services: arguments: ['@database'] tags: - { name: backend_overridable } + Drupal\ban\BanIpManagerInterface: '@ban.ip_manager' ban.middleware: class: Drupal\ban\BanMiddleware arguments: ['@ban.ip_manager'] diff --git a/core/modules/big_pipe/big_pipe.services.yml b/core/modules/big_pipe/big_pipe.services.yml index 09747e887fb8b47f1ff812bf6ab7b321d0f61db0..764a0461e9417ccb0f02049a35781bde213de43e 100644 --- a/core/modules/big_pipe/big_pipe.services.yml +++ b/core/modules/big_pipe/big_pipe.services.yml @@ -12,6 +12,7 @@ services: big_pipe: class: Drupal\big_pipe\Render\BigPipe arguments: ['@renderer', '@session', '@request_stack', '@http_kernel', '@event_dispatcher', '@config.factory'] + Drupal\big_pipe\Render\BigPipe: '@big_pipe' html_response.attachments_processor.big_pipe: public: false class: \Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor diff --git a/core/modules/block/block.services.yml b/core/modules/block/block.services.yml index 815f38578c82808cf29b38c3d6e075e8d913c064..b548ffaf4fb309e328754b938521661535c6b1df 100644 --- a/core/modules/block/block.services.yml +++ b/core/modules/block/block.services.yml @@ -10,3 +10,4 @@ services: block.repository: class: Drupal\block\BlockRepository arguments: ['@entity_type.manager', '@theme.manager', '@context.handler'] + Drupal\block\BlockRepositoryInterface: '@block.repository' diff --git a/core/modules/book/book.services.yml b/core/modules/book/book.services.yml index 63bd10b6c63c6e5a8a5a5a9e4e987fb289651d9e..780a6bffa4be024932a4bf6e5cbbab682971f543 100644 --- a/core/modules/book/book.services.yml +++ b/core/modules/book/book.services.yml @@ -7,17 +7,21 @@ services: book.manager: class: Drupal\book\BookManager arguments: ['@entity_type.manager', '@string_translation', '@config.factory', '@book.outline_storage', '@renderer', '@language_manager', '@entity.repository', '@book.backend_chained_cache', '@book.memory_cache'] + Drupal\book\BookManagerInterface: '@book.manager' book.outline: class: Drupal\book\BookOutline arguments: ['@book.manager'] + Drupal\book\BookOutline: '@book.outline' book.export: class: Drupal\book\BookExport arguments: ['@entity_type.manager', '@book.manager', '@entity.repository'] + Drupal\book\BookExport: '@book.export' book.outline_storage: class: Drupal\book\BookOutlineStorage arguments: ['@database'] tags: - { name: backend_overridable } + Drupal\book\BookOutlineStorageInterface: '@book.outline_storage' access_check.book.removable: class: Drupal\book\Access\BookNodeIsRemovableAccessCheck arguments: ['@book.manager'] diff --git a/core/modules/breakpoint/breakpoint.services.yml b/core/modules/breakpoint/breakpoint.services.yml index a1e86ec5b278731c7670b4fac2fe327ddfc020fa..5bfcbe4111bc45a02bf6ddf1cd5df7ffcab93218 100644 --- a/core/modules/breakpoint/breakpoint.services.yml +++ b/core/modules/breakpoint/breakpoint.services.yml @@ -4,3 +4,4 @@ services: arguments: ['@module_handler', '@theme_handler', '@cache.discovery', '@string_translation'] tags: - { name: plugin_manager_cache_clear } + Drupal\breakpoint\BreakpointManagerInterface: '@breakpoint.manager' diff --git a/core/modules/ckeditor5/ckeditor5.services.yml b/core/modules/ckeditor5/ckeditor5.services.yml index b235935a8fe901a7e7b62247bc3c2c30e8490333..8f73ec072149b925e3d82b9ea908e72dc6e1dca5 100644 --- a/core/modules/ckeditor5/ckeditor5.services.yml +++ b/core/modules/ckeditor5/ckeditor5.services.yml @@ -2,6 +2,7 @@ services: plugin.manager.ckeditor5.plugin: class: Drupal\ckeditor5\Plugin\CKEditor5PluginManager parent: default_plugin_manager + Drupal\ckeditor5\Plugin\CKEditor5PluginManagerInterface: '@plugin.manager.ckeditor5.plugin' # @todo Remove in Drupal 11: https://www.drupal.org/project/ckeditor5/issues/3239012 plugin.manager.ckeditor4to5upgrade.plugin: public: false @@ -15,11 +16,13 @@ services: - '@logger.channel.ckeditor5' - '@module_handler' - '@current_user' + Drupal\ckeditor5\SmartDefaultSettings: '@ckeditor5.smart_default_settings' ckeditor5.stylesheets.message: class: Drupal\ckeditor5\CKEditor5StylesheetsMessage arguments: - '@theme_handler' - '@config.factory' + Drupal\ckeditor5\CKEditor5StylesheetsMessage: '@ckeditor5.stylesheets.message' ckeditor5.ckeditor5_cache_tag: class: Drupal\ckeditor5\EventSubscriber\CKEditor5CacheTag arguments: ['@cache_tags.invalidator'] diff --git a/core/modules/comment/comment.services.yml b/core/modules/comment/comment.services.yml index 3595854ceb07e5be4b5d234cb45a382bf663745f..f356ea1b7ab7fc8457d19ce50bdd9419cc9ba947 100644 --- a/core/modules/comment/comment.services.yml +++ b/core/modules/comment/comment.services.yml @@ -8,12 +8,14 @@ services: comment.manager: class: Drupal\comment\CommentManager arguments: ['@entity_type.manager', '@config.factory', '@string_translation', '@module_handler', '@current_user', '@entity_field.manager', '@entity_display.repository'] + Drupal\comment\CommentManagerInterface: '@comment.manager' comment.statistics: class: Drupal\comment\CommentStatistics arguments: ['@database', '@current_user', '@entity_type.manager', '@state', '@database.replica'] tags: - { name: backend_overridable } + Drupal\comment\CommentStatisticsInterface: '@comment.statistics' comment.lazy_builders: class: Drupal\comment\CommentLazyBuilders @@ -22,3 +24,4 @@ services: comment.link_builder: class: Drupal\comment\CommentLinkBuilder arguments: ['@current_user', '@comment.manager', '@module_handler', '@string_translation', '@entity_type.manager'] + Drupal\comment\CommentLinkBuilderInterface: '@comment.link_builder' diff --git a/core/modules/config_translation/config_translation.services.yml b/core/modules/config_translation/config_translation.services.yml index 4baaffa0fbacfc9482f6901504527d813e766e31..adf636ed8507aa6aeda16fa7994df785c91cbe6a 100644 --- a/core/modules/config_translation/config_translation.services.yml +++ b/core/modules/config_translation/config_translation.services.yml @@ -25,3 +25,4 @@ services: - '@module_handler' - '@config.typed' - '@theme_handler' + Drupal\config_translation\ConfigMapperManagerInterface: '@plugin.manager.config_translation.mapper' diff --git a/core/modules/contact/contact.services.yml b/core/modules/contact/contact.services.yml index fef18ce78ca04f745aba9b56612c9c1a2e6b34dd..eee32c821791ae3d67305c6afb78afda98748a0e 100644 --- a/core/modules/contact/contact.services.yml +++ b/core/modules/contact/contact.services.yml @@ -7,6 +7,7 @@ services: contact.mail_handler: class: Drupal\contact\MailHandler arguments: ['@plugin.manager.mail', '@language_manager', '@logger.channel.contact', '@string_translation', '@entity_type.manager'] + Drupal\contact\MailHandlerInterface: '@contact.mail_handler' logger.channel.contact: class: Drupal\Core\Logger\LoggerChannel factory: ['@logger.factory', 'get'] diff --git a/core/modules/content_moderation/content_moderation.services.yml b/core/modules/content_moderation/content_moderation.services.yml index 8e72240006a2f4febe41665c218c90fb67b0827b..401cf09090d10a9d84151c26f1c806d0afae7c4a 100644 --- a/core/modules/content_moderation/content_moderation.services.yml +++ b/core/modules/content_moderation/content_moderation.services.yml @@ -2,9 +2,11 @@ services: content_moderation.state_transition_validation: class: Drupal\content_moderation\StateTransitionValidation arguments: ['@content_moderation.moderation_information'] + Drupal\content_moderation\StateTransitionValidationInterface: '@content_moderation.state_transition_validation' content_moderation.moderation_information: class: Drupal\content_moderation\ModerationInformation arguments: ['@entity_type.manager', '@entity_type.bundle.info'] + Drupal\content_moderation\ModerationInformationInterface: '@content_moderation.moderation_information' access_check.latest_revision: class: Drupal\content_moderation\Access\LatestRevisionCheck arguments: ['@content_moderation.moderation_information'] diff --git a/core/modules/content_translation/content_translation.services.yml b/core/modules/content_translation/content_translation.services.yml index ac5bc1059145054dd87409602a9ccb778dedc5b7..b29f02e72c7b6baf156e5239d39d074c1b747723 100644 --- a/core/modules/content_translation/content_translation.services.yml +++ b/core/modules/content_translation/content_translation.services.yml @@ -2,6 +2,7 @@ services: content_translation.synchronizer: class: Drupal\content_translation\FieldTranslationSynchronizer arguments: ['@entity_type.manager', '@plugin.manager.field.field_type'] + Drupal\content_translation\FieldTranslationSynchronizerInterface: '@content_translation.synchronizer' content_translation.subscriber: class: Drupal\content_translation\Routing\ContentTranslationRouteSubscriber @@ -30,3 +31,5 @@ services: content_translation.manager: class: Drupal\content_translation\ContentTranslationManager arguments: ['@entity_type.manager', '@entity_type.bundle.info'] + Drupal\content_translation\ContentTranslationManagerInterface: '@content_translation.manager' + Drupal\content_translation\BundleTranslationSettingsInterface: '@content_translation.manager' diff --git a/core/modules/file/file.services.yml b/core/modules/file/file.services.yml index 1aaaab614f279c02548aa1478ce39f1eb99da24b..d11c5f070af4f629df93dee049c3e06109e61cde 100644 --- a/core/modules/file/file.services.yml +++ b/core/modules/file/file.services.yml @@ -7,6 +7,8 @@ services: file.upload_handler: class: Drupal\file\Upload\FileUploadHandler arguments: [ '@file_system', '@entity_type.manager', '@stream_wrapper_manager', '@event_dispatcher', '@file.mime_type.guesser', '@current_user', '@request_stack', '@file.repository' ] + Drupal\file\Upload\FileUploadHandler: '@file.upload_handler' file.repository: class: Drupal\file\FileRepository arguments: [ '@file_system', '@stream_wrapper_manager', '@entity_type.manager', '@module_handler', '@file.usage', '@current_user' ] + Drupal\file\FileRepositoryInterface: '@file.repository' diff --git a/core/modules/forum/forum.services.yml b/core/modules/forum/forum.services.yml index 6268c2cf8aaf271d2849629b647bb5a60057c7ee..15caa41b925bd15bd6efd26363218dbe5b991cad 100644 --- a/core/modules/forum/forum.services.yml +++ b/core/modules/forum/forum.services.yml @@ -4,6 +4,7 @@ services: arguments: ['@config.factory', '@entity_type.manager', '@database', '@string_translation', '@comment.manager', '@entity_field.manager'] tags: - { name: backend_overridable } + Drupal\forum\ForumManagerInterface: '@forum_manager' forum.breadcrumb.node: class: Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder arguments: ['@entity_type.manager', '@config.factory', '@forum_manager', '@string_translation'] @@ -19,6 +20,7 @@ services: arguments: ['@database'] tags: - { name: backend_overridable } + Drupal\forum\ForumIndexStorageInterface: '@forum.index_storage' forum.uninstall_validator: class: Drupal\forum\ForumUninstallValidator diff --git a/core/modules/help_topics/help_topics.services.yml b/core/modules/help_topics/help_topics.services.yml index 6a2754d77ffbcf635b1dd81e6185c5f8d63049d4..aae5415c3e3f32fc69b0a111ce150d1e5434f552 100644 --- a/core/modules/help_topics/help_topics.services.yml +++ b/core/modules/help_topics/help_topics.services.yml @@ -8,6 +8,7 @@ services: plugin.manager.help_topic: class: Drupal\help_topics\HelpTopicPluginManager arguments: ['@module_handler', '@theme_handler', '@cache.discovery', '%app.root%'] + Drupal\help_topics\HelpTopicPluginManagerInterface: '@plugin.manager.help_topic' help.twig.loader: class: Drupal\help_topics\HelpTopicTwigLoader arguments: ['%app.root%', '@module_handler', '@theme_handler'] diff --git a/core/modules/jsonapi/jsonapi.services.yml b/core/modules/jsonapi/jsonapi.services.yml index e54be7f253fc607cd84f5ad38461cd3f2e042db4..377ee978f4785d9e1e96b309edffe8478e53b54a 100644 --- a/core/modules/jsonapi/jsonapi.services.yml +++ b/core/modules/jsonapi/jsonapi.services.yml @@ -84,6 +84,7 @@ services: jsonapi.resource_type.repository: class: Drupal\jsonapi\ResourceType\ResourceTypeRepository arguments: ['@entity_type.manager', '@entity_type.bundle.info', '@entity_field.manager', '@cache.jsonapi_resource_types', '@event_dispatcher'] + Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface: '@jsonapi.resource_type.repository' jsonapi.route_enhancer: class: Drupal\jsonapi\Routing\RouteEnhancer tags: @@ -91,11 +92,13 @@ services: jsonapi.field_resolver: class: Drupal\jsonapi\Context\FieldResolver arguments: ['@entity_type.manager', '@entity_field.manager', '@entity_type.bundle.info', '@jsonapi.resource_type.repository', '@module_handler', '@current_user'] + Drupal\jsonapi\Context\FieldResolver: '@jsonapi.field_resolver' jsonapi.include_resolver: class: Drupal\jsonapi\IncludeResolver arguments: - '@entity_type.manager' - '@jsonapi.entity_access_checker' + Drupal\jsonapi\IncludeResolver: '@jsonapi.include_resolver' paramconverter.jsonapi.entity_uuid: parent: paramconverter.entity class: Drupal\jsonapi\ParamConverter\EntityUuidConverter @@ -158,6 +161,7 @@ services: calls: # This is a temporary measure. JSON:API should not need to be aware of the Content Moderation module. - [setLatestRevisionCheck, ['@?access_check.latest_revision']] # This is only injected when the service is available. + Drupal\jsonapi\Access\EntityAccessChecker: '@jsonapi.entity_access_checker' access_check.jsonapi.relationship_route_access: class: Drupal\jsonapi\Access\RelationshipRouteAccessCheck arguments: ['@jsonapi.entity_access_checker'] @@ -186,6 +190,7 @@ services: - '@jsonapi.serializer' - '@datetime.time' - '@current_user' + Drupal\jsonapi\Controller\EntityResource: '@jsonapi.entity_resource' jsonapi.file_upload: class: Drupal\jsonapi\Controller\FileUpload arguments: @@ -193,6 +198,7 @@ services: - '@entity_field.manager' - '@jsonapi.file.uploader.field' - '@http_kernel' + Drupal\jsonapi\Controller\FileUpload: '@jsonapi.file_upload' # Event subscribers. jsonapi.custom_query_parameter_names_validator.subscriber: @@ -223,6 +229,7 @@ services: public: false tags: - { name: service_collector, tag: jsonapi_version_negotiator, call: addVersionNegotiator } + Drupal\jsonapi\Revisions\VersionNegotiator: '@jsonapi.version_negotiator' jsonapi.version_negotiator.default: arguments: ['@entity_type.manager'] public: false @@ -250,3 +257,4 @@ services: class: Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader public: false arguments: ['@logger.channel.file', '@file_system', '@file.mime_type.guesser', '@token', '@lock', '@config.factory'] + Drupal\jsonapi\Controller\TemporaryJsonapiFileFieldUploader: '@jsonapi.file.uploader.field' diff --git a/core/modules/language/language.services.yml b/core/modules/language/language.services.yml index 4fda6484c185b1fc332ea7d77d12805bafead5b2..ffc267f3f5731765eaa4bde0fe95157ffc6e0289 100644 --- a/core/modules/language/language.services.yml +++ b/core/modules/language/language.services.yml @@ -7,6 +7,7 @@ services: arguments: ['@language_manager', '@plugin.manager.language_negotiation_method', '@config.factory', '@settings', '@request_stack'] calls: - [initLanguageManager] + Drupal\language\LanguageNegotiatorInterface: '@language_negotiator' language.config_subscriber: class: Drupal\language\EventSubscriber\ConfigSubscriber arguments: ['@language_manager', '@language.default', '@config.factory', '@language_negotiator'] @@ -18,6 +19,8 @@ services: tags: - { name: config.factory.override, priority: -254 } - { name: event_subscriber } + Drupal\language\Config\LanguageConfigFactoryOverrideInterface: '@language.config_factory_override' + Drupal\Core\Config\ConfigFactoryOverrideInterface: '@language.config_factory_override' language_converter: class: Drupal\language\LanguageConverter arguments: ['@language_manager'] diff --git a/core/modules/layout_builder/layout_builder.services.yml b/core/modules/layout_builder/layout_builder.services.yml index 4e9fc3acda00784b4c306cf00769fcba24419e7c..c70f15534275497997518bd949ed7f3eb957a7ed 100644 --- a/core/modules/layout_builder/layout_builder.services.yml +++ b/core/modules/layout_builder/layout_builder.services.yml @@ -2,6 +2,7 @@ services: layout_builder.tempstore_repository: class: Drupal\layout_builder\LayoutTempstoreRepository arguments: ['@tempstore.shared'] + Drupal\layout_builder\LayoutTempstoreRepositoryInterface: '@layout_builder.tempstore_repository' access_check.entity.layout_builder_access: class: Drupal\layout_builder\Access\LayoutBuilderAccessCheck tags: @@ -10,6 +11,7 @@ services: class: Drupal\layout_builder\SectionStorage\SectionStorageManager parent: default_plugin_manager arguments: ['@context.handler'] + Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface: '@plugin.manager.layout_builder.section_storage' layout_builder.routes: class: Drupal\layout_builder\Routing\LayoutBuilderRoutes arguments: ['@plugin.manager.layout_builder.section_storage'] @@ -38,6 +40,7 @@ services: layout_builder.sample_entity_generator: class: Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator arguments: ['@tempstore.shared', '@entity_type.manager'] + Drupal\layout_builder\Entity\SampleEntityGeneratorInterface: '@layout_builder.sample_entity_generator' layout_builder.render_block_component_subscriber: class: Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray arguments: ['@current_user'] @@ -49,6 +52,7 @@ services: inline_block.usage: class: Drupal\layout_builder\InlineBlockUsage arguments: ['@database'] + Drupal\layout_builder\InlineBlockUsageInterface: '@inline_block.usage' layout_builder.controller.entity_form: # Override the entity form controller to handle the entity layout_builder # operation. @@ -56,6 +60,7 @@ services: class: Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController public: false arguments: ['@layout_builder.controller.entity_form.inner'] + Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController: '@layout_builder.controller.entity_form' layout_builder.element.prepare_layout: class: Drupal\layout_builder\EventSubscriber\PrepareLayout arguments: ['@layout_builder.tempstore_repository', '@messenger'] diff --git a/core/modules/layout_discovery/layout_discovery.services.yml b/core/modules/layout_discovery/layout_discovery.services.yml index 48d32292ccddbb82ec3d41c663c04172b06ecd70..fa984e0c254ef9904571436247b1cf144670df96 100644 --- a/core/modules/layout_discovery/layout_discovery.services.yml +++ b/core/modules/layout_discovery/layout_discovery.services.yml @@ -2,6 +2,8 @@ services: plugin.manager.core.layout: class: Drupal\Core\Layout\LayoutPluginManager arguments: ['@container.namespaces', '@cache.discovery', '@module_handler', '@theme_handler'] + Drupal\Core\Layout\LayoutPluginManagerInterface: '@plugin.manager.core.layout' layout.icon_builder: class: Drupal\Core\Layout\Icon\SvgIconBuilder shared: false + Drupal\Core\Layout\Icon\IconBuilderInterface: '@layout.icon_builder' diff --git a/core/modules/locale/locale.services.yml b/core/modules/locale/locale.services.yml index b9f8fb807e7b72780b9d4ca086eca75256d12a40..5a98a8482e7598147ea4c3cb257fa58853d6919e 100644 --- a/core/modules/locale/locale.services.yml +++ b/core/modules/locale/locale.services.yml @@ -3,20 +3,25 @@ services: class: Drupal\locale\LocaleDefaultConfigStorage arguments: ['@config.storage', '@language_manager', '%install_profile%'] public: false + Drupal\locale\LocaleDefaultConfigStorage: '@locale.default.config.storage' locale.config_manager: class: Drupal\locale\LocaleConfigManager arguments: ['@config.storage', '@locale.storage', '@config.factory', '@config.typed', '@language_manager', '@locale.default.config.storage', '@config.manager'] + Drupal\locale\LocaleConfigManager: '@locale.config_manager' locale.storage: class: Drupal\locale\StringDatabaseStorage arguments: ['@database'] tags: - { name: backend_overridable } + Drupal\locale\StringStorageInterface: '@locale.storage' locale.project: class: Drupal\locale\LocaleProjectStorage arguments: ['@keyvalue'] + Drupal\locale\LocaleProjectStorageInterface: '@locale.project' locale.plural.formula: class: Drupal\locale\PluralFormula arguments: ['@language_manager', '@state'] + Drupal\locale\PluralFormulaInterface: '@locale.plural.formula' string_translator.locale.lookup: class: Drupal\locale\LocaleTranslation arguments: ['@locale.storage', '@cache.default', '@lock', '@config.factory', '@language_manager', '@request_stack'] diff --git a/core/modules/media/media.services.yml b/core/modules/media/media.services.yml index 252a51dd08163cc6a8943604f0193c9fa0d68297..26c688b55d7642da166b790ecd6d14755bec8b56 100644 --- a/core/modules/media/media.services.yml +++ b/core/modules/media/media.services.yml @@ -5,15 +5,19 @@ services: media.oembed.url_resolver: class: Drupal\media\OEmbed\UrlResolver arguments: ['@media.oembed.provider_repository', '@media.oembed.resource_fetcher', '@http_client', '@module_handler', '@cache.default'] + Drupal\media\OEmbed\UrlResolverInterface: '@media.oembed.url_resolver' media.oembed.provider_repository: class: Drupal\media\OEmbed\ProviderRepository arguments: ['@http_client', '@config.factory', '@datetime.time', '@keyvalue', '@logger.factory'] + Drupal\media\OEmbed\ProviderRepositoryInterface: '@media.oembed.provider_repository' media.oembed.resource_fetcher: class: Drupal\media\OEmbed\ResourceFetcher arguments: ['@http_client', '@media.oembed.provider_repository', '@cache.default'] + Drupal\media\OEmbed\ResourceFetcherInterface: '@media.oembed.resource_fetcher' media.oembed.iframe_url_helper: class: Drupal\media\IFrameUrlHelper arguments: ['@router.request_context', '@private_key'] + Drupal\media\IFrameUrlHelper: '@media.oembed.iframe_url_helper' media.config_subscriber: class: Drupal\media\EventSubscriber\MediaConfigSubscriber arguments: ['@router.builder', '@cache_tags.invalidator', '@entity_type.manager'] diff --git a/core/modules/media_library/media_library.services.yml b/core/modules/media_library/media_library.services.yml index eaad55fcf50b3e5fe006324e4ea1821f065e7ad6..193fc19a15cb268a934843a4aa06c86503f46cc1 100644 --- a/core/modules/media_library/media_library.services.yml +++ b/core/modules/media_library/media_library.services.yml @@ -2,6 +2,7 @@ services: media_library.ui_builder: class: Drupal\media_library\MediaLibraryUiBuilder arguments: ['@entity_type.manager', '@request_stack', '@views.executable', '@form_builder', '@media_library.opener_resolver'] + Drupal\media_library\MediaLibraryUiBuilder: '@media_library.ui_builder' media_library.route_subscriber: class: Drupal\media_library\Routing\RouteSubscriber tags: @@ -10,6 +11,7 @@ services: class: Drupal\media_library\OpenerResolver calls: - [setContainer, ['@service_container']] + Drupal\media_library\OpenerResolverInterface: '@media_library.opener_resolver' media_library.opener.field_widget: class: Drupal\media_library\MediaLibraryFieldWidgetOpener arguments: ['@entity_type.manager'] diff --git a/core/modules/migrate/migrate.services.yml b/core/modules/migrate/migrate.services.yml index f18a22babf28d525ec52aa7e52bbd881d28bb281..8b67ff02c9f3c9bd3c38a6c77e83c7959efd14ad 100644 --- a/core/modules/migrate/migrate.services.yml +++ b/core/modules/migrate/migrate.services.yml @@ -30,9 +30,13 @@ services: plugin.manager.migration: class: Drupal\migrate\Plugin\MigrationPluginManager arguments: ['@module_handler', '@cache.discovery_migration', '@language_manager'] + Drupal\migrate\Plugin\MigrationPluginManagerInterface: '@plugin.manager.migration' + Drupal\migrate\MigrateBuildDependencyInterface: '@plugin.manager.migration' migrate.lookup: class: Drupal\migrate\MigrateLookup arguments: ['@plugin.manager.migration'] + Drupal\migrate\MigrateLookupInterface: '@migrate.lookup' migrate.stub: class: Drupal\migrate\MigrateStub arguments: ['@plugin.manager.migration'] + Drupal\migrate\MigrateStubInterface: '@migrate.stub' diff --git a/core/modules/migrate_drupal/migrate_drupal.services.yml b/core/modules/migrate_drupal/migrate_drupal.services.yml index 741ae970d7deb3cb41d5c934ca3eb13f4a47a7f8..80444d04750bfa4e85d1b16c105722b32f4506c3 100644 --- a/core/modules/migrate_drupal/migrate_drupal.services.yml +++ b/core/modules/migrate_drupal/migrate_drupal.services.yml @@ -7,6 +7,7 @@ services: - '@cache.discovery' - '@module_handler' - '\Drupal\migrate_drupal\Annotation\MigrateField' + Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface: '@plugin.manager.migrate.field' logger.channel.migrate_drupal: parent: logger.channel_base arguments: ['migrate_drupal'] @@ -16,6 +17,8 @@ services: - '@plugin.manager.migrate.field' - '@plugin.manager.migration' - '@logger.channel.migrate_drupal' + Drupal\migrate_drupal\FieldDiscoveryInterface: '@migrate_drupal.field_discovery' migrate_drupal.migration_state: class: Drupal\migrate_drupal\MigrationState arguments: ['@plugin.manager.migrate.field', '@module_handler', '@messenger', '@string_translation'] + Drupal\migrate_drupal\MigrationState: '@migrate_drupal.migration_state' diff --git a/core/modules/node/node.services.yml b/core/modules/node/node.services.yml index 3de1fa88cbbf63cf424130f90eaff74f23259bcd..e9ac3a2606839997f03a8e842b382ec6907950b5 100644 --- a/core/modules/node/node.services.yml +++ b/core/modules/node/node.services.yml @@ -8,6 +8,7 @@ services: arguments: ['@database', '@module_handler', '@language_manager'] tags: - { name: backend_overridable } + Drupal\node\NodeGrantDatabaseStorageInterface: '@node.grant_storage' access_check.node.preview: class: Drupal\node\Access\NodePreviewAccessCheck arguments: ['@entity_type.manager'] diff --git a/core/modules/path_alias/path_alias.services.yml b/core/modules/path_alias/path_alias.services.yml index c36eee191edc98b041ed06bc44614aee2f1665b5..2d8b59aa96fa3ff735e61d024b4f6b0408185a9b 100644 --- a/core/modules/path_alias/path_alias.services.yml +++ b/core/modules/path_alias/path_alias.services.yml @@ -13,13 +13,16 @@ services: path_alias.manager: class: Drupal\path_alias\AliasManager arguments: ['@path_alias.repository', '@path_alias.whitelist', '@language_manager', '@cache.data'] + Drupal\path_alias\AliasManagerInterface: '@path_alias.manager' path_alias.repository: class: Drupal\path_alias\AliasRepository arguments: ['@database'] tags: - { name: backend_overridable } + Drupal\path_alias\AliasRepositoryInterface: '@path_alias.repository' path_alias.whitelist: class: Drupal\path_alias\AliasWhitelist tags: - { name: needs_destruction } arguments: [path_alias_whitelist, '@cache.bootstrap', '@lock', '@state', '@path_alias.repository'] + Drupal\path_alias\AliasWhitelistInterface: '@path_alias.whitelist' diff --git a/core/modules/search/search.services.yml b/core/modules/search/search.services.yml index 8f6e2a0fcc16b0f730b47f73a8074b26f9895d10..bda507af4f043ecdbfe894d884e1b5a83bf817e0 100644 --- a/core/modules/search/search.services.yml +++ b/core/modules/search/search.services.yml @@ -6,13 +6,16 @@ services: search.search_page_repository: class: Drupal\search\SearchPageRepository arguments: ['@config.factory', '@entity_type.manager'] + Drupal\search\SearchPageRepositoryInterface: '@search.search_page_repository' search.index: class: Drupal\search\SearchIndex arguments: ['@config.factory', '@database','@database.replica', '@cache_tags.invalidator', '@search.text_processor'] tags: - { name: backend_overridable } + Drupal\search\SearchIndexInterface: '@search.index' search.text_processor: class: Drupal\search\SearchTextProcessor arguments: ['@transliteration', '@config.factory', '@module_handler'] + Drupal\search\SearchTextProcessorInterface: '@search.text_processor' diff --git a/core/modules/serialization/serialization.services.yml b/core/modules/serialization/serialization.services.yml index a5c6f67a728c1a1b3065b80f3fd902eb95bb8774..81120a046442cc2d4057066cf07908fbf6078a47 100644 --- a/core/modules/serialization/serialization.services.yml +++ b/core/modules/serialization/serialization.services.yml @@ -93,6 +93,7 @@ services: - { name: encoder, format: xml } serializer.entity_resolver: class: Drupal\serialization\EntityResolver\ChainEntityResolver + Drupal\serialization\EntityResolver\ChainEntityResolverInterface: '@serializer.entity_resolver' serializer.entity_resolver.uuid: class: Drupal\serialization\EntityResolver\UuidResolver tags: diff --git a/core/modules/statistics/statistics.services.yml b/core/modules/statistics/statistics.services.yml index cf15573024f0aafdf7c33038448573054205f321..beea6a6ccd089b1974f9856e974c07e457202134 100644 --- a/core/modules/statistics/statistics.services.yml +++ b/core/modules/statistics/statistics.services.yml @@ -4,3 +4,4 @@ services: arguments: ['@database', '@state', '@request_stack'] tags: - { name: backend_overridable } + Drupal\statistics\StatisticsStorageInterface: '@statistics.storage.node' diff --git a/core/modules/system/system.services.yml b/core/modules/system/system.services.yml index dba427f4b3ed302f16f0198af94757f3a1831474..36e821d8c87839e200b11edb2b0fbfe7abde344e 100644 --- a/core/modules/system/system.services.yml +++ b/core/modules/system/system.services.yml @@ -10,6 +10,7 @@ services: system.manager: class: Drupal\system\SystemManager arguments: ['@module_handler', '@request_stack', '@menu.link_tree', '@menu.active_trail'] + Drupal\system\SystemManager: '@system.manager' system.breadcrumb.default: class: Drupal\system\PathBasedBreadcrumbBuilder arguments: ['@router.request_context', '@access_manager', '@router', '@path_processor_manager', '@config.factory', '@title_resolver', '@current_user', '@path.current', '@path.matcher'] @@ -59,6 +60,7 @@ services: system.sa_fetcher: class: Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher arguments: ['@config.factory', '@keyvalue.expirable', '@http_client', '@extension.list.module', '@extension.list.theme', '@extension.list.profile', '@logger.channel.system', '@settings'] + Drupal\system\SecurityAdvisories\SecurityAdvisoriesFetcher: '@system.sa_fetcher' system.advisories_config_subscriber: class: Drupal\system\EventSubscriber\AdvisoriesConfigSubscriber arguments: ['@system.sa_fetcher'] diff --git a/core/modules/update/update.services.yml b/core/modules/update/update.services.yml index 545612dcb35bc13ef31c66904f4ea1712245da6a..0c19e7a010f0a398a01d7ef84683c39393f7bbe3 100644 --- a/core/modules/update/update.services.yml +++ b/core/modules/update/update.services.yml @@ -7,12 +7,15 @@ services: update.manager: class: Drupal\update\UpdateManager arguments: ['@config.factory', '@module_handler', '@update.processor', '@string_translation', '@keyvalue.expirable', '@theme_handler', '@extension.list.module'] + Drupal\update\UpdateManagerInterface: '@update.manager' update.processor: class: Drupal\update\UpdateProcessor arguments: ['@config.factory', '@queue', '@update.fetcher', '@state', '@private_key', '@keyvalue', '@keyvalue.expirable'] + Drupal\update\UpdateProcessorInterface: '@update.processor' update.fetcher: class: Drupal\update\UpdateFetcher arguments: ['@config.factory', '@http_client', '@settings', '@logger.channel.update'] + Drupal\update\UpdateFetcherInterface: '@update.fetcher' update.root: class: Drupal\update\UpdateRoot arguments: ['@kernel', '@request_stack'] diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml index f8f7d15f4e1b3f31b71d49527c58ab3ddb50617b..cafc073d47f25879f2ff2233324e3b275941d52c 100644 --- a/core/modules/user/user.services.yml +++ b/core/modules/user/user.services.yml @@ -26,6 +26,7 @@ services: arguments: ['@database'] tags: - { name: backend_overridable } + Drupal\user\UserDataInterface: '@user.data' user_maintenance_mode_subscriber: class: Drupal\user\EventSubscriber\MaintenanceModeSubscriber arguments: ['@maintenance_mode', '@current_user'] @@ -49,9 +50,11 @@ services: user.auth: class: Drupal\user\UserAuth arguments: ['@entity_type.manager', '@password'] + Drupal\user\UserAuthInterface: '@user.auth' user.permissions: class: Drupal\user\PermissionHandler arguments: ['@module_handler', '@string_translation', '@controller_resolver'] + Drupal\user\PermissionHandlerInterface: '@user.permissions' user.current_user_context: class: Drupal\user\ContextProvider\CurrentUserContext arguments: ['@current_user', '@entity_type.manager'] @@ -63,6 +66,7 @@ services: user.flood_control: class: Drupal\user\UserFloodControl arguments: ['@flood', '@event_dispatcher', '@request_stack'] + Drupal\user\UserFloodControlInterface: '@user.flood_control' user.flood_subscriber: class: Drupal\user\EventSubscriber\UserFloodSubscriber arguments: ['@logger.channel.user'] diff --git a/core/modules/views/views.services.yml b/core/modules/views/views.services.yml index 4ce2d449caaa96b2450f9a143471dcc47f8cb87b..8d61f13cc428154007dedd74b8917809686b217d 100644 --- a/core/modules/views/views.services.yml +++ b/core/modules/views/views.services.yml @@ -61,15 +61,19 @@ services: arguments: ['@cache.default', '@config.factory', '@module_handler', '@language_manager'] tags: - { name: backend_overridable } + Drupal\views\ViewsData: '@views.views_data' views.views_data_helper: class: Drupal\views\ViewsDataHelper arguments: ['@views.views_data'] + Drupal\views\ViewsDataHelper: '@views.views_data_helper' views.executable: class: Drupal\views\ViewExecutableFactory arguments: ['@current_user', '@request_stack', '@views.views_data', '@router.route_provider'] + Drupal\views\ViewExecutableFactory: '@views.executable' views.analyzer: class: Drupal\views\Analyzer arguments: ['@module_handler'] + Drupal\views\Analyzer: '@views.analyzer' views.route_subscriber: class: Drupal\views\EventSubscriber\RouteSubscriber arguments: ['@entity_type.manager', '@state'] @@ -77,6 +81,7 @@ services: - { name: 'event_subscriber' } views.exposed_form_cache: class: Drupal\views\ExposedFormCache + Drupal\views\ExposedFormCache: '@views.exposed_form_cache' views.entity_schema_subscriber: class: Drupal\views\EventSubscriber\ViewsEntitySchemaSubscriber arguments: ['@entity_type.manager', '@logger.channel.default'] diff --git a/core/modules/workspaces/workspaces.services.yml b/core/modules/workspaces/workspaces.services.yml index 4aa7de957aa154fd0b527dc5e60398dbb2ca5180..2f30f5c767337c562cc68f0e5b2b577dca257f74 100644 --- a/core/modules/workspaces/workspaces.services.yml +++ b/core/modules/workspaces/workspaces.services.yml @@ -4,18 +4,22 @@ services: arguments: ['@request_stack', '@entity_type.manager', '@entity.memory_cache', '@current_user', '@state', '@logger.channel.workspaces', '@class_resolver', '@workspaces.association'] tags: - { name: service_id_collector, tag: workspace_negotiator } + Drupal\workspaces\WorkspaceManagerInterface: '@workspaces.manager' workspaces.operation_factory: class: Drupal\workspaces\WorkspaceOperationFactory arguments: ['@entity_type.manager', '@database', '@workspaces.manager', '@workspaces.association', '@cache_tags.invalidator', '@event_dispatcher', '@logger.channel.workspaces'] + Drupal\workspaces\WorkspaceOperationFactory: '@workspaces.operation_factory' workspaces.association: class: Drupal\workspaces\WorkspaceAssociation arguments: ['@database', '@entity_type.manager', '@workspaces.repository', '@logger.channel.workspaces'] tags: - { name: backend_overridable } - { name: event_subscriber } + Drupal\workspaces\WorkspaceAssociationInterface: '@workspaces.association' workspaces.repository: class: Drupal\workspaces\WorkspaceRepository arguments: ['@entity_type.manager', '@cache.default'] + Drupal\workspaces\WorkspaceRepositoryInterface: '@workspaces.repository' workspaces.negotiator.session: class: Drupal\workspaces\Negotiator\SessionWorkspaceNegotiator diff --git a/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php b/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php index ac8246c8ef86fdb0c4bdb90db943925c15d02bb8..5bfd6d48f75c70c7bae633d56be4715023428ab6 100644 --- a/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php +++ b/core/tests/Drupal/KernelTests/Core/DependencyInjection/AutowireTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Database\Connection; use Drupal\Core\DrupalKernelInterface; use Drupal\Core\Serialization\Yaml; +use Drupal\KernelTests\FileSystemModuleDiscoveryDataProviderTrait; use Drupal\KernelTests\KernelTestBase; /** @@ -17,6 +18,8 @@ */ class AutowireTest extends KernelTestBase { + use FileSystemModuleDiscoveryDataProviderTrait; + /** * {@inheritdoc} */ @@ -44,26 +47,32 @@ public function testAutowire(): void { public function testCoreServiceAliases(): void { $services = []; $aliases = []; - foreach (Yaml::decode(file_get_contents('core/core.services.yml'))['services'] as $id => $service) { - if (is_string($service)) { - $aliases[$id] = substr($service, 1); - } - elseif (isset($service['class']) && class_exists($service['class'])) { - // Ignore certain tagged services. - if (isset($service['tags'])) { - foreach ($service['tags'] as $tag) { - if (in_array($tag['name'], [ - 'access_check', - 'cache.context', - 'context_provider', - 'module_install.uninstall_validator', - ])) { - continue 2; + + $filenames = array_map(fn($module) => "core/modules/{$module[0]}/{$module[0]}.services.yml", $this->coreModuleListDataProvider()); + $filenames[] = 'core/core.services.yml'; + foreach (array_filter($filenames, 'file_exists') as $filename) { + foreach (Yaml::decode(file_get_contents($filename))['services'] as $id => $service) { + if (is_string($service)) { + $aliases[$id] = substr($service, 1); + } + elseif (isset($service['class']) && class_exists($service['class'])) { + // Ignore certain tagged services. + if (isset($service['tags'])) { + foreach ($service['tags'] as $tag) { + if (in_array($tag['name'], [ + 'access_check', + 'cache.context', + 'context_provider', + 'event_subscriber', + 'module_install.uninstall_validator', + ])) { + continue 2; + } } } - } - $services[$id] = $service['class']; + $services[$id] = $service['class']; + } } }