From b15ef343b9a168dbe88c4cac64550a2bc84b323d Mon Sep 17 00:00:00 2001
From: Jochen Roth <jochen.roth@b13.com>
Date: Mon, 10 Jun 2024 17:22:32 +0200
Subject: [PATCH] [TASK] Use Autoconfigure attribute

Currently, Services.yaml files are used
to register a services as public.

This has been changed throughout the core
(where possible) to use the PHP attribute
"Autoconfigure" to have all options in
one place.

Resolves: #104023
Releases: main
Change-Id: I3165806fb635c17d10b42f268cc2f0cd194dde56
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84548
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
---
 .../Classes/Controller/AjaxController.php     |  2 +
 .../Classes/Controller/MainController.php     |  2 +
 .../Classes/Modules/CacheModule.php           |  2 +
 .../Classes/Modules/Debug/Events.php          |  2 +
 .../adminpanel/Classes/Modules/Debug/Log.php  |  2 +
 .../Classes/Modules/DebugModule.php           |  2 +
 .../Modules/Info/GeneralInformation.php       |  2 +
 .../adminpanel/Classes/Modules/InfoModule.php |  2 +
 .../Classes/Modules/PreviewModule.php         |  2 +
 .../Modules/TsDebug/TypoScriptWaterfall.php   |  2 +
 .../Classes/Modules/TsDebugModule.php         |  2 +
 .../adminpanel/Configuration/Services.yaml    | 24 -----
 .../Classes/Authentication/PasswordReset.php  |  2 +
 .../Backend/Shortcut/ShortcutRepository.php   |  2 +
 .../ToolbarItems/ClearCacheToolbarItem.php    |  2 +
 .../ToolbarItems/ShortcutToolbarItem.php      |  2 +
 .../SystemInformationToolbarItem.php          |  2 +
 .../Classes/ContextMenu/ContextMenu.php       |  2 +
 .../Form/FormDataProvider/ReturnUrl.php       |  2 +
 .../FormDataProvider/SiteDatabaseEditRow.php  |  2 +
 .../Form/Processor/SelectItemProcessor.php    |  2 +
 .../Classes/History/RecordHistoryRollback.php |  2 +
 .../Classes/Resource/PublicUrlPrefixer.php    |  2 +
 .../SudoMode/Access/AccessFactory.php         |  2 +
 .../SudoMode/Access/AccessStorage.php         |  2 +
 .../View/ContentCreationPagePositionMap.php   |  2 +
 .../View/ContentMovingPagePositionMap.php     |  2 +
 .../View/AuthenticationStyleInformation.php   |  2 +
 .../backend/Configuration/Services.yaml       | 48 ----------
 .../Mfa/MfaProviderRegistry.php               |  2 +
 .../Configuration/FlexForm/FlexFormTools.php  |  2 +
 .../Classes/Controller/FileDumpController.php |  2 +
 .../PasswordGeneratorController.php           |  2 +
 .../DataHandling/ItemProcessingService.php    |  2 +
 .../core/Classes/Database/ReferenceIndex.php  |  2 +
 .../Classes/Database/Schema/SqlReader.php     |  2 +
 .../Domain/Access/RecordAccessVoter.php       |  2 +
 .../ExpressionLanguage/DefaultProvider.php    |  2 +
 .../core/Classes/Html/RteHtmlParser.php       |  2 +
 .../LinkHandling/TypoLinkCodecService.php     |  2 +
 .../TcaSystemLanguageCollector.php            |  2 +
 .../core/Classes/Locking/ResourceMutex.php    |  2 +
 typo3/sysext/core/Classes/Mail/Mailer.php     |  2 +
 .../Package/PackageActivationService.php      |  2 +
 .../core/Classes/Page/PageLayoutResolver.php  |  2 +
 .../Storage/CachingFrameworkStorage.php       |  2 +
 .../Resource/DefaultUploadFolderResolver.php  |  2 +
 .../core/Classes/Resource/FileRepository.php  |  2 +
 .../Processing/PreviewProcessing.php          |  2 +
 .../Resource/Security/SvgHookHandler.php      |  3 +
 .../Resource/Security/SvgTypeCheck.php        |  2 +
 .../Service/FileProcessingService.php         |  2 +
 .../Routing/BackendEntryPointResolver.php     |  2 +
 .../Classes/Routing/RequestContextFactory.php |  2 +
 .../ContentSecurityPolicy/PolicyProvider.php  |  2 +
 .../ContentSecurityPolicy/PolicyRegistry.php  |  3 +
 .../Classes/TypoScript/AST/AstBuilder.php     |  2 +
 .../IncludeTree/StringTreeBuilder.php         |  2 +
 .../IncludeTree/SysTemplateRepository.php     |  2 +
 .../IncludeTree/SysTemplateTreeBuilder.php    |  2 +
 .../IncludeTree/TsConfigTreeBuilder.php       |  2 +
 typo3/sysext/core/Configuration/Services.yaml | 96 -------------------
 .../BulkExtensionRepositoryWriter.php         |  2 +
 .../Classes/Remote/RemoteRegistry.php         |  3 +
 .../Configuration/Services.yaml               |  6 --
 .../Mvc/Configuration/TypoScriptService.php   |  2 +
 .../Property/PropertyMappingConfiguration.php |  2 +
 typo3/sysext/form/Configuration/Services.yaml |  6 --
 .../ContentObject/ContentDataProcessor.php    |  2 +
 .../Controller/ShowImageController.php        |  2 +
 .../frontend/Classes/Html/HtmlWorker.php      |  2 +
 .../Classes/Resource/PublicUrlPrefixer.php    |  2 +
 .../frontend/Configuration/Services.yaml      | 12 ---
 .../linkvalidator/Classes/LinkAnalyzer.php    |  2 +
 .../Classes/Linktype/ExternalLinktype.php     |  2 +
 .../Repository/BrokenLinkRepository.php       |  2 +
 .../Classes/Result/LinkAnalyzerResult.php     |  2 +
 .../linkvalidator/Configuration/Services.yaml | 12 ---
 .../ProviderRegistry.php                      |  3 +
 .../lowlevel/Configuration/Services.yaml      |  3 -
 .../Hooks/DataHandlerSlugUpdateHook.php       |  2 +
 .../Classes/Report/Status/RedirectStatus.php  |  2 +
 .../redirects/Configuration/Services.yaml     |  6 --
 .../reports/Classes/Report/Status/Status.php  |  2 +
 .../reports/Configuration/Services.yaml       |  3 -
 .../Repository/SchedulerTaskRepository.php    |  2 +
 .../scheduler/Configuration/Services.yaml     |  3 -
 .../Classes/Canonical/CanonicalGenerator.php  |  2 +
 .../seo/Classes/MetaTag/MetaTagGenerator.php  |  2 +
 .../Classes/XmlSitemap/XmlSitemapRenderer.php |  2 +
 typo3/sysext/seo/Configuration/Services.yaml  |  9 --
 .../Classes/Listener/MessageListener.php      |  2 +
 .../Listener/PageModificationListener.php     |  2 +
 .../WebhookTypesItemsProcFunc.php             |  2 +
 .../webhooks/Classes/WebhookTypesRegistry.php |  2 +
 .../webhooks/Configuration/Services.yaml      | 13 ---
 .../Controller/Remote/ActionHandler.php       |  2 +
 .../Controller/Remote/RemoteServer.php        |  2 +
 .../Classes/Hook/DataHandlerHook.php          |  2 +
 .../Notification/StageChangeNotification.php  |  2 +
 .../Classes/Preview/PreviewUriBuilder.php     |  2 +
 .../Classes/Service/GridDataService.php       |  2 +
 .../workspaces/Configuration/Services.yaml    | 18 ----
 103 files changed, 182 insertions(+), 259 deletions(-)

diff --git a/typo3/sysext/adminpanel/Classes/Controller/AjaxController.php b/typo3/sysext/adminpanel/Classes/Controller/AjaxController.php
index 6009e39602ec..a4ab7554d161 100644
--- a/typo3/sysext/adminpanel/Classes/Controller/AjaxController.php
+++ b/typo3/sysext/adminpanel/Classes/Controller/AjaxController.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Adminpanel\Controller;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\Service\ConfigurationService;
 use TYPO3\CMS\Adminpanel\Service\ModuleLoader;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Core\Http\JsonResponse;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class AjaxController
 {
     protected array $adminPanelModuleConfiguration;
diff --git a/typo3/sysext/adminpanel/Classes/Controller/MainController.php b/typo3/sysext/adminpanel/Classes/Controller/MainController.php
index 79d87919181b..7ac24c2d52da 100644
--- a/typo3/sysext/adminpanel/Classes/Controller/MainController.php
+++ b/typo3/sysext/adminpanel/Classes/Controller/MainController.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Adminpanel\Controller;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\ConfigurableInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\DataProviderInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\ModuleDataStorageCollection;
@@ -45,6 +46,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class MainController
 {
     /** @var array<string, ModuleInterface> */
diff --git a/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php b/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php
index 5163f340b4af..9e7356fc3ca8 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/CacheModule.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Adminpanel\Modules;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\PageSettingsProviderInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\RequestEnricherInterface;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\View\StandaloneView;
 use TYPO3\CMS\Frontend\Cache\CacheInstruction;
 
+#[Autoconfigure(public: true)]
 class CacheModule extends AbstractModule implements PageSettingsProviderInterface, RequestEnricherInterface, ResourceProviderInterface
 {
     public function getIconIdentifier(): string
diff --git a/typo3/sysext/adminpanel/Classes/Modules/Debug/Events.php b/typo3/sysext/adminpanel/Classes/Modules/Debug/Events.php
index e64147405caf..0b88b4e0864e 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/Debug/Events.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/Debug/Events.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Adminpanel\Modules\Debug;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\VarDumper\Cloner\Data;
 use Symfony\Component\VarDumper\Cloner\VarCloner;
 use Symfony\Component\VarDumper\Dumper\AbstractDumper;
@@ -33,6 +34,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
 /**
  * Shows all dispatched Events of the current request
  */
+#[Autoconfigure(public: true)]
 class Events extends AbstractSubModule implements DataProviderInterface
 {
     public function __construct(private readonly RequestId $requestId) {}
diff --git a/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php b/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php
index 7ea1f9f441b7..05fede950d97 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/Debug/Log.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Adminpanel\Modules\Debug;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractSubModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\DataProviderInterface;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class Log extends AbstractSubModule implements DataProviderInterface, ModuleSettingsProviderInterface, RequestEnricherInterface
 {
     protected int $logLevel;
diff --git a/typo3/sysext/adminpanel/Classes/Modules/DebugModule.php b/typo3/sysext/adminpanel/Classes/Modules/DebugModule.php
index 6ff578f52171..719ac0fb4b43 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/DebugModule.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/DebugModule.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Adminpanel\Modules;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\Log\InMemoryLogWriter;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\ShortInfoProviderInterface;
@@ -27,6 +28,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Debug Module of the AdminPanel
  */
+#[Autoconfigure(public: true)]
 class DebugModule extends AbstractModule implements ShortInfoProviderInterface
 {
     public function getIdentifier(): string
diff --git a/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php b/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php
index 884ccb1106e7..69b6d0e5691c 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/Info/GeneralInformation.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Adminpanel\Modules\Info;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractSubModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\DataProviderInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\ModuleData;
@@ -33,6 +34,7 @@ use TYPO3\CMS\Fluid\View\StandaloneView;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class GeneralInformation extends AbstractSubModule implements DataProviderInterface
 {
     public function __construct(
diff --git a/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php b/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php
index 645460f202ed..d04080e6bc9f 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/InfoModule.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Adminpanel\Modules;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\ShortInfoProviderInterface;
 use TYPO3\CMS\Core\TimeTracker\TimeTracker;
@@ -25,6 +26,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Admin Panel Info Module
  */
+#[Autoconfigure(public: true)]
 class InfoModule extends AbstractModule implements ShortInfoProviderInterface
 {
     public function getIconIdentifier(): string
diff --git a/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php b/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php
index dd9c68d367b3..2a86901dfbd3 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/PreviewModule.php
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Adminpanel\Modules;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\OnSubmitActorInterface;
 use TYPO3\CMS\Adminpanel\ModuleApi\PageSettingsProviderInterface;
@@ -42,6 +43,7 @@ use TYPO3\CMS\Frontend\Cache\CacheInstruction;
 /**
  * Admin Panel Preview Module
  */
+#[Autoconfigure(public: true)]
 class PreviewModule extends AbstractModule implements RequestEnricherInterface, PageSettingsProviderInterface, ResourceProviderInterface, OnSubmitActorInterface, LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php b/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php
index ddbc1b9394b0..4864dca98b0c 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/TsDebug/TypoScriptWaterfall.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Adminpanel\Modules\TsDebug;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractSubModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\ModuleData;
 use TYPO3\CMS\Adminpanel\ModuleApi\ModuleSettingsProviderInterface;
@@ -32,6 +33,7 @@ use TYPO3\CMS\Frontend\Cache\CacheInstruction;
 /**
  * @internal
  */
+#[Autoconfigure(public: true)]
 class TypoScriptWaterfall extends AbstractSubModule implements RequestEnricherInterface, ModuleSettingsProviderInterface
 {
     protected array $printConf = [
diff --git a/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php b/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php
index 149cebdea392..dbe23920628e 100644
--- a/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php
+++ b/typo3/sysext/adminpanel/Classes/Modules/TsDebugModule.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Adminpanel\Modules;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Adminpanel\ModuleApi\AbstractModule;
 use TYPO3\CMS\Adminpanel\ModuleApi\ShortInfoProviderInterface;
 use TYPO3\CMS\Core\TimeTracker\TimeTracker;
@@ -25,6 +26,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Admin Panel TypoScript Debug Module
  */
+#[Autoconfigure(public: true)]
 class TsDebugModule extends AbstractModule implements ShortInfoProviderInterface
 {
     public function getIdentifier(): string
diff --git a/typo3/sysext/adminpanel/Configuration/Services.yaml b/typo3/sysext/adminpanel/Configuration/Services.yaml
index cca02b9dd6c1..40519bb250d9 100644
--- a/typo3/sysext/adminpanel/Configuration/Services.yaml
+++ b/typo3/sysext/adminpanel/Configuration/Services.yaml
@@ -12,30 +12,6 @@ services:
     factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
     arguments: ['adminpanel_requestcache']
 
-  TYPO3\CMS\Adminpanel\Controller\AjaxController:
-    public: true
-  TYPO3\CMS\Adminpanel\Controller\MainController:
-    public: true
-
-  TYPO3\CMS\Adminpanel\Modules\CacheModule:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\DebugModule:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\InfoModule:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\PreviewModule:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\TsDebugModule:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\Debug\Log:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\Debug\Events:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\Info\GeneralInformation:
-    public: true
-  TYPO3\CMS\Adminpanel\Modules\TsDebug\TypoScriptWaterfall:
-    public: true
-
   Psr\EventDispatcher\EventDispatcherInterface:
     alias: TYPO3\CMS\Adminpanel\Service\EventDispatcher
     public: true
diff --git a/typo3/sysext/backend/Classes/Authentication/PasswordReset.php b/typo3/sysext/backend/Classes/Authentication/PasswordReset.php
index c44396a8d748..963675971937 100644
--- a/typo3/sysext/backend/Classes/Authentication/PasswordReset.php
+++ b/typo3/sysext/backend/Classes/Authentication/PasswordReset.php
@@ -23,6 +23,7 @@ use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\UriInterface;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Mime\Address;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Core\Context\Context;
@@ -61,6 +62,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal this is a concrete implementation for User/Password login and not part of public TYPO3 Core API.
  */
+#[Autoconfigure(public: true)]
 class PasswordReset implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/backend/Classes/Backend/Shortcut/ShortcutRepository.php b/typo3/sysext/backend/Classes/Backend/Shortcut/ShortcutRepository.php
index 25319bbb1a5b..a17e3237ca51 100644
--- a/typo3/sysext/backend/Classes/Backend/Shortcut/ShortcutRepository.php
+++ b/typo3/sysext/backend/Classes/Backend/Shortcut/ShortcutRepository.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\Backend\Shortcut;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Module\ModuleProvider;
 use TYPO3\CMS\Backend\Routing\Router;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
@@ -38,6 +39,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal This class is a specific Backend implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class ShortcutRepository
 {
     /**
diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php
index 3593939cd69d..fb8b1bbf4df9 100644
--- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php
+++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ClearCacheToolbarItem.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Backend\Backend\ToolbarItems;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Backend\Event\ModifyClearCacheActionsEvent;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Toolbar\RequestAwareToolbarItemInterface;
@@ -31,6 +32,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
  * Adds a dropdown if there are more than one item to clear (usually for admins to render the flush all caches).
  * The dropdown items can be manipulated using ModifyClearCacheActionsEvent.
  */
+#[Autoconfigure(public: true)]
 class ClearCacheToolbarItem implements ToolbarItemInterface, RequestAwareToolbarItemInterface
 {
     protected array $cacheActions = [];
diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
index cd7fd03d4179..6f977dad79ef 100644
--- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
+++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/ShortcutToolbarItem.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Backend\ToolbarItems;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository;
 use TYPO3\CMS\Backend\Toolbar\RequestAwareToolbarItemInterface;
 use TYPO3\CMS\Backend\Toolbar\ToolbarItemInterface;
@@ -29,6 +30,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
  *
  * @internal This class is a specific Backend implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class ShortcutToolbarItem implements ToolbarItemInterface, RequestAwareToolbarItemInterface
 {
     private ServerRequestInterface $request;
diff --git a/typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php b/typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
index 5564c4bcb2ed..dc7913d6c6ad 100644
--- a/typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
+++ b/typo3/sysext/backend/Classes/Backend/ToolbarItems/SystemInformationToolbarItem.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Backend\Backend\ToolbarItems;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Backend\Event\SystemInformationToolbarCollectorEvent;
 use TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus as DeprectaedInformationStatus;
 use TYPO3\CMS\Backend\Toolbar\InformationStatus;
@@ -37,6 +38,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * Render system information toolbar item and drop-down.
  * Provides some events for other extensions to add information.
  */
+#[Autoconfigure(public: true)]
 class SystemInformationToolbarItem implements ToolbarItemInterface, RequestAwareToolbarItemInterface
 {
     private ServerRequestInterface $request;
diff --git a/typo3/sysext/backend/Classes/ContextMenu/ContextMenu.php b/typo3/sysext/backend/Classes/ContextMenu/ContextMenu.php
index fb1da11a9267..1d2983fdf149 100644
--- a/typo3/sysext/backend/Classes/ContextMenu/ContextMenu.php
+++ b/typo3/sysext/backend/Classes/ContextMenu/ContextMenu.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\ContextMenu;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\ContextMenu\ItemProviders\ItemProvidersRegistry;
 use TYPO3\CMS\Backend\ContextMenu\ItemProviders\ProviderInterface;
 
@@ -24,6 +25,7 @@ use TYPO3\CMS\Backend\ContextMenu\ItemProviders\ProviderInterface;
  * Class for generating the click menu
  * @internal
  */
+#[Autoconfigure(public: true)]
 class ContextMenu
 {
     protected ItemProvidersRegistry $itemProvidersRegistry;
diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/ReturnUrl.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/ReturnUrl.php
index 49cb8d3c5d4c..1f94de07ae31 100644
--- a/typo3/sysext/backend/Classes/Form/FormDataProvider/ReturnUrl.php
+++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/ReturnUrl.php
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Backend\Form\FormDataProvider;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 
@@ -30,6 +31,7 @@ use TYPO3\CMS\Backend\Routing\UriBuilder;
  *        data, since only controllers know details about current
  *        context. The fallback below is a bit of guesswork.
  */
+#[Autoconfigure(public: true)]
 class ReturnUrl implements FormDataProviderInterface
 {
     public function __construct(private readonly UriBuilder $uriBuilder) {}
diff --git a/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteDatabaseEditRow.php b/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteDatabaseEditRow.php
index 61b51fbde2e9..c145f69b9635 100644
--- a/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteDatabaseEditRow.php
+++ b/typo3/sysext/backend/Classes/Form/FormDataProvider/SiteDatabaseEditRow.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\Form\FormDataProvider;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Form\FormDataProviderInterface;
 use TYPO3\CMS\Core\Configuration\SiteConfiguration;
 use TYPO3\CMS\Core\Exception\SiteNotFoundException;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * Fetch "row" data from yml file and set as 'databaseRow'
  */
+#[Autoconfigure(public: true)]
 class SiteDatabaseEditRow implements FormDataProviderInterface
 {
     /**
diff --git a/typo3/sysext/backend/Classes/Form/Processor/SelectItemProcessor.php b/typo3/sysext/backend/Classes/Form/Processor/SelectItemProcessor.php
index 6ddf0f76f7fd..8fad90fbdeb2 100644
--- a/typo3/sysext/backend/Classes/Form/Processor/SelectItemProcessor.php
+++ b/typo3/sysext/backend/Classes/Form/Processor/SelectItemProcessor.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\Form\Processor;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
@@ -29,6 +30,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * @internal ext:backend internal implementation and not part of the public core API.
  * @todo Move additional shareable code from form-engine into here.
  */
+#[Autoconfigure(public: true)]
 final class SelectItemProcessor
 {
     public function __construct(protected readonly LanguageServiceFactory $languageServiceFactory) {}
diff --git a/typo3/sysext/backend/Classes/History/RecordHistoryRollback.php b/typo3/sysext/backend/Classes/History/RecordHistoryRollback.php
index 75ac36c62a86..087348f12c86 100644
--- a/typo3/sysext/backend/Classes/History/RecordHistoryRollback.php
+++ b/typo3/sysext/backend/Classes/History/RecordHistoryRollback.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\History;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\History\Event\AfterHistoryRollbackFinishedEvent;
 use TYPO3\CMS\Backend\History\Event\BeforeHistoryRollbackStartEvent;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
@@ -25,6 +26,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
+#[Autoconfigure(public: true)]
 class RecordHistoryRollback
 {
     /**
diff --git a/typo3/sysext/backend/Classes/Resource/PublicUrlPrefixer.php b/typo3/sysext/backend/Classes/Resource/PublicUrlPrefixer.php
index e8f9c712d5c8..b8c1db1320b7 100644
--- a/typo3/sysext/backend/Classes/Resource/PublicUrlPrefixer.php
+++ b/typo3/sysext/backend/Classes/Resource/PublicUrlPrefixer.php
@@ -17,11 +17,13 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\Resource;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Resource\Event\GeneratePublicUrlForResourceEvent;
 use TYPO3\CMS\Core\Resource\ResourceInterface;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 
+#[Autoconfigure(public: true)]
 class PublicUrlPrefixer
 {
     /**
diff --git a/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessFactory.php b/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessFactory.php
index ea156215aebe..3e5961a478e7 100644
--- a/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessFactory.php
+++ b/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessFactory.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Backend\Security\SudoMode\Access;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Routing\Route;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -26,6 +27,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class AccessFactory
 {
     protected const DEFAULT_CLAIM_LIFETIME = 300;
diff --git a/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessStorage.php b/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessStorage.php
index e1408338a47e..d0b7bcc88177 100644
--- a/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessStorage.php
+++ b/typo3/sysext/backend/Classes/Security/SudoMode/Access/AccessStorage.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Backend\Security\SudoMode\Access;
 
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 
 /**
@@ -26,6 +27,7 @@ use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class AccessStorage implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/backend/Classes/Tree/View/ContentCreationPagePositionMap.php b/typo3/sysext/backend/Classes/Tree/View/ContentCreationPagePositionMap.php
index ec6ce457a292..1f836628e8dc 100644
--- a/typo3/sysext/backend/Classes/Tree/View/ContentCreationPagePositionMap.php
+++ b/typo3/sysext/backend/Classes/Tree/View/ContentCreationPagePositionMap.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\Tree\View;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\View\BackendLayoutView;
@@ -29,6 +30,7 @@ use TYPO3\CMS\Core\Utility\StringUtility;
  *
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class ContentCreationPagePositionMap extends AbstractContentPagePositionMap
 {
     /**
diff --git a/typo3/sysext/backend/Classes/Tree/View/ContentMovingPagePositionMap.php b/typo3/sysext/backend/Classes/Tree/View/ContentMovingPagePositionMap.php
index 69525f8cf745..5347ed1dacd6 100644
--- a/typo3/sysext/backend/Classes/Tree/View/ContentMovingPagePositionMap.php
+++ b/typo3/sysext/backend/Classes/Tree/View/ContentMovingPagePositionMap.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Backend\Tree\View;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\View\BackendLayoutView;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Core\Imaging\IconSize;
  *
  * @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class ContentMovingPagePositionMap extends AbstractContentPagePositionMap
 {
     /**
diff --git a/typo3/sysext/backend/Classes/View/AuthenticationStyleInformation.php b/typo3/sysext/backend/Classes/View/AuthenticationStyleInformation.php
index b17dbae39638..f97cab467090 100644
--- a/typo3/sysext/backend/Classes/View/AuthenticationStyleInformation.php
+++ b/typo3/sysext/backend/Classes/View/AuthenticationStyleInformation.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Backend\View;
 
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Core\Utility\PathUtility;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class AuthenticationStyleInformation implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/backend/Configuration/Services.yaml b/typo3/sysext/backend/Configuration/Services.yaml
index f2a4b230e979..fb06daa03388 100644
--- a/typo3/sysext/backend/Configuration/Services.yaml
+++ b/typo3/sysext/backend/Configuration/Services.yaml
@@ -15,16 +15,10 @@ services:
     tags:
       - { name: 'console.command', command: 'backend:user:create', description: 'Create a backend user', schedulable: false }
 
-  TYPO3\CMS\Backend\Authentication\PasswordReset:
-    public: true
-
   TYPO3\CMS\Backend\Clipboard\Clipboard:
     shared: false
     public: true
 
-  TYPO3\CMS\Backend\ContextMenu\ContextMenu:
-    public: true
-
   TYPO3\CMS\Backend\ContextMenu\ItemProviders\ItemProvidersRegistry:
     arguments:
       - !tagged_iterator backend.contextmenu.itemprovider
@@ -39,15 +33,6 @@ services:
     shared: false
     public: true
 
-  TYPO3\CMS\Backend\History\RecordHistoryRollback:
-    public: true
-
-  TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository:
-    public: true
-
-  TYPO3\CMS\Backend\View\AuthenticationStyleInformation:
-    public: true
-
   TYPO3\CMS\Backend\Search\LiveSearch\SearchProviderRegistry:
     arguments:
       - !tagged_iterator livesearch.provider
@@ -60,18 +45,9 @@ services:
     tags:
       - { name: 'livesearch.provider', priority: 60 }
 
-  TYPO3\CMS\Backend\Form\FormDataProvider\ReturnUrl:
-    public: true
-
-  TYPO3\CMS\Backend\Form\FormDataProvider\SiteDatabaseEditRow:
-    public: true
-
   TYPO3\CMS\Backend\Form\InlineStackProcessor:
     shared: false
 
-  TYPO3\CMS\Backend\Form\Processor\SelectItemProcessor:
-    public: true
-
   TYPO3\CMS\Backend\RecordList\DatabaseRecordList:
     shared: false
     public: true
@@ -87,34 +63,10 @@ services:
     arguments:
       - !tagged_iterator recordlist.elementbrowser
 
-  TYPO3\CMS\Backend\Resource\PublicUrlPrefixer:
-    public: true
-
-  TYPO3\CMS\Backend\Backend\ToolbarItems\ClearCacheToolbarItem:
-    public: true
-
-  TYPO3\CMS\Backend\Backend\ToolbarItems\ShortcutToolbarItem:
-    public: true
-
-  TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem:
-    public: true
-
   TYPO3\CMS\Backend\LinkHandler\RecordLinkHandler:
     shared: false
     public: true
 
-  TYPO3\CMS\Backend\Tree\View\ContentCreationPagePositionMap:
-    public: true
-
-  TYPO3\CMS\Backend\Tree\View\ContentMovingPagePositionMap:
-    public: true
-
-  TYPO3\CMS\Backend\Security\SudoMode\Access\AccessFactory:
-    public: true
-
-  TYPO3\CMS\Backend\Security\SudoMode\Access\AccessStorage:
-    public: true
-
   TYPO3\CMS\Backend\View\RecordSearchBoxComponent:
     shared: false
     public: true
diff --git a/typo3/sysext/core/Classes/Authentication/Mfa/MfaProviderRegistry.php b/typo3/sysext/core/Classes/Authentication/Mfa/MfaProviderRegistry.php
index 2b77d10b2056..5bec18b842d3 100644
--- a/typo3/sysext/core/Classes/Authentication/Mfa/MfaProviderRegistry.php
+++ b/typo3/sysext/core/Classes/Authentication/Mfa/MfaProviderRegistry.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Authentication\Mfa;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
 
 /**
@@ -24,6 +25,7 @@ use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
  *
  * @internal should only be used by the TYPO3 Core
  */
+#[Autoconfigure(public: true)]
 class MfaProviderRegistry
 {
     /**
diff --git a/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php b/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
index 9c2830591ffa..22202c4c483f 100644
--- a/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
+++ b/typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\Configuration\FlexForm;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureIdentifierInitializedEvent;
 use TYPO3\CMS\Core\Configuration\Event\AfterFlexFormDataStructureParsedEvent;
 use TYPO3\CMS\Core\Configuration\Event\BeforeFlexFormDataStructureIdentifierInitializedEvent;
@@ -36,6 +37,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * This service provides various helpers to determine the data structure of flex form
  * fields and to maintain integrity of flex form related details in general.
  */
+#[Autoconfigure(public: true)]
 class FlexFormTools
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Controller/FileDumpController.php b/typo3/sysext/core/Classes/Controller/FileDumpController.php
index c3d4982b5e6a..cf526af84555 100644
--- a/typo3/sysext/core/Classes/Controller/FileDumpController.php
+++ b/typo3/sysext/core/Classes/Controller/FileDumpController.php
@@ -21,6 +21,7 @@ use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ResponseFactoryInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Crypto\HashService;
 use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
 use TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent;
@@ -35,6 +36,7 @@ use TYPO3\CMS\Core\Resource\Security\FileNameValidator;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 
+#[Autoconfigure(public: true)]
 readonly class FileDumpController
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Controller/PasswordGeneratorController.php b/typo3/sysext/core/Classes/Controller/PasswordGeneratorController.php
index b6b1412133d4..0b3691c7e52f 100644
--- a/typo3/sysext/core/Classes/Controller/PasswordGeneratorController.php
+++ b/typo3/sysext/core/Classes/Controller/PasswordGeneratorController.php
@@ -21,6 +21,7 @@ use Psr\Http\Message\ResponseFactoryInterface;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\StreamFactoryInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Crypto\Random;
 use TYPO3\CMS\Core\Exception\InvalidPasswordRulesException;
 use TYPO3\CMS\Core\Localization\LanguageService;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Core\Localization\LanguageService;
 /**
  * @internal Only to be used within TYPO3. Might change in the future.
  */
+#[Autoconfigure(public: true)]
 class PasswordGeneratorController
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/DataHandling/ItemProcessingService.php b/typo3/sysext/core/Classes/DataHandling/ItemProcessingService.php
index 71b1dc58f665..c4a9f6786cda 100644
--- a/typo3/sysext/core/Classes/DataHandling/ItemProcessingService.php
+++ b/typo3/sysext/core/Classes/DataHandling/ItemProcessingService.php
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Core\DataHandling;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Exception\SiteNotFoundException;
 use TYPO3\CMS\Core\Localization\LanguageService;
@@ -30,6 +31,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Provides services around item processing
  */
+#[Autoconfigure(public: true)]
 class ItemProcessingService
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Database/ReferenceIndex.php b/typo3/sysext/core/Classes/Database/ReferenceIndex.php
index 9779818f26eb..8b52fddd3834 100644
--- a/typo3/sysext/core/Classes/Database/ReferenceIndex.php
+++ b/typo3/sysext/core/Classes/Database/ReferenceIndex.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Core\Database;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Log\LogLevel;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\View\ProgressListenerInterface;
 use TYPO3\CMS\Core\Configuration\FlexForm\Exception\InvalidIdentifierException;
@@ -36,6 +37,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal Extensions shouldn't fiddle with the reference index themselves, it's task of DataHandler to do this.
  */
+#[Autoconfigure(public: true)]
 class ReferenceIndex
 {
     /**
diff --git a/typo3/sysext/core/Classes/Database/Schema/SqlReader.php b/typo3/sysext/core/Classes/Database/Schema/SqlReader.php
index 72a316a41259..7752c6f43879 100644
--- a/typo3/sysext/core/Classes/Database/Schema/SqlReader.php
+++ b/typo3/sysext/core/Classes/Database/Schema/SqlReader.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\Database\Schema;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Database\Event\AlterTableDefinitionStatementsEvent;
 use TYPO3\CMS\Core\Package\PackageManager;
 
@@ -27,6 +28,7 @@ use TYPO3\CMS\Core\Package\PackageManager;
  *
  * @internal not part of public core API.
  */
+#[Autoconfigure(public: true)]
 class SqlReader
 {
     /**
diff --git a/typo3/sysext/core/Classes/Domain/Access/RecordAccessVoter.php b/typo3/sysext/core/Classes/Domain/Access/RecordAccessVoter.php
index aa55f8226528..051a00fe0c1b 100644
--- a/typo3/sysext/core/Classes/Domain/Access/RecordAccessVoter.php
+++ b/typo3/sysext/core/Classes/Domain/Access/RecordAccessVoter.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\Domain\Access;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Context\Context;
 
 /**
@@ -25,6 +26,7 @@ use TYPO3\CMS\Core\Context\Context;
  *
  * Not related to "write permissions" etc.
  */
+#[Autoconfigure(public: true)]
 class RecordAccessVoter
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/ExpressionLanguage/DefaultProvider.php b/typo3/sysext/core/Classes/ExpressionLanguage/DefaultProvider.php
index 2a835aacc048..abe0a9c62f7b 100644
--- a/typo3/sysext/core/Classes/ExpressionLanguage/DefaultProvider.php
+++ b/typo3/sysext/core/Classes/ExpressionLanguage/DefaultProvider.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\ExpressionLanguage;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Configuration\Features;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Core\Environment;
@@ -29,6 +30,7 @@ use TYPO3\CMS\Core\Information\Typo3Version;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class DefaultProvider extends AbstractProvider
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Html/RteHtmlParser.php b/typo3/sysext/core/Classes/Html/RteHtmlParser.php
index 0a45bbf97b29..2701adb83189 100644
--- a/typo3/sysext/core/Classes/Html/RteHtmlParser.php
+++ b/typo3/sysext/core/Classes/Html/RteHtmlParser.php
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Core\Html;
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Configuration\Features;
 use TYPO3\CMS\Core\Html\Event\BrokenLinkAnalysisEvent;
 use TYPO3\CMS\Core\LinkHandling\Exception\UnknownLinkHandlerException;
@@ -36,6 +37,7 @@ use TYPO3\HtmlSanitizer\Builder\BuilderInterface;
  * line breaks to LFs internally, however when all transformations are done, all LFs are transformed to CRLFs.
  * This means: RteHtmlParser always returns CRLFs to be maximum compatible with all formats.
  */
+#[Autoconfigure(public: true)]
 class RteHtmlParser extends HtmlParser implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php b/typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php
index a03bf61dfdb8..448f5292b6cd 100644
--- a/typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php
+++ b/typo3/sysext/core/Classes/LinkHandling/TypoLinkCodecService.php
@@ -18,12 +18,14 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\LinkHandling;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\LinkHandling\Event\AfterTypoLinkDecodedEvent;
 use TYPO3\CMS\Core\LinkHandling\Event\BeforeTypoLinkEncodedEvent;
 
 /**
  * This class provides basic functionality to encode and decode typolink strings
  */
+#[Autoconfigure(public: true)]
 final readonly class TypoLinkCodecService
 {
     /**
diff --git a/typo3/sysext/core/Classes/Localization/TcaSystemLanguageCollector.php b/typo3/sysext/core/Classes/Localization/TcaSystemLanguageCollector.php
index fd86a0206c77..8543d196c4dd 100644
--- a/typo3/sysext/core/Classes/Localization/TcaSystemLanguageCollector.php
+++ b/typo3/sysext/core/Classes/Localization/TcaSystemLanguageCollector.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Localization;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Site\Entity\NullSite;
 use TYPO3\CMS\Core\Site\SiteFinder;
@@ -26,6 +27,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  * Provides ItemProcFunc fields for special population of available TYPO3 system languages
  * @internal
  */
+#[Autoconfigure(public: true)]
 final class TcaSystemLanguageCollector
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Locking/ResourceMutex.php b/typo3/sysext/core/Classes/Locking/ResourceMutex.php
index 564023d482bf..6443ec672278 100644
--- a/typo3/sysext/core/Classes/Locking/ResourceMutex.php
+++ b/typo3/sysext/core/Classes/Locking/ResourceMutex.php
@@ -15,6 +15,7 @@
 
 namespace TYPO3\CMS\Core\Locking;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Locking\Exception\LockAcquireException;
 use TYPO3\CMS\Core\Locking\Exception\LockAcquireWouldBlockException;
 use TYPO3\CMS\Core\Locking\Exception\LockCreateException;
@@ -50,6 +51,7 @@ use TYPO3\CMS\Core\Locking\Exception\LockCreateException;
  *
  * Note that the access lock resources are NEVER deleted/destroyed, otherwise the whole thing would be broken.
  */
+#[Autoconfigure(public: true)]
 class ResourceMutex
 {
     /**
diff --git a/typo3/sysext/core/Classes/Mail/Mailer.php b/typo3/sysext/core/Classes/Mail/Mailer.php
index 90b5073e8b45..92268e3a8e49 100644
--- a/typo3/sysext/core/Classes/Mail/Mailer.php
+++ b/typo3/sysext/core/Classes/Mail/Mailer.php
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Core\Mail;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Mailer\Envelope;
 use Symfony\Component\Mailer\SentMessage;
 use Symfony\Component\Mailer\Transport\TransportInterface;
@@ -35,6 +36,7 @@ use TYPO3\CMS\Core\Utility\MailUtility;
  * This will use the setting in TYPO3_CONF_VARS to choose the correct transport
  * for it to work out-of-the-box.
  */
+#[Autoconfigure(public: true)]
 class Mailer implements MailerInterface
 {
     protected array $mailSettings = [];
diff --git a/typo3/sysext/core/Classes/Package/PackageActivationService.php b/typo3/sysext/core/Classes/Package/PackageActivationService.php
index b0dc2d04bcc7..85e5cee6d63c 100644
--- a/typo3/sysext/core/Classes/Package/PackageActivationService.php
+++ b/typo3/sysext/core/Classes/Package/PackageActivationService.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\Package;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Cache\CacheManager;
 use TYPO3\CMS\Core\Configuration\Extension\ExtLocalconfFactory;
 use TYPO3\CMS\Core\Configuration\Extension\ExtTablesFactory;
@@ -37,6 +38,7 @@ use TYPO3\CMS\Core\Utility\PathUtility;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class PackageActivationService
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Page/PageLayoutResolver.php b/typo3/sysext/core/Classes/Page/PageLayoutResolver.php
index 791ea90e0b0a..2a36903b3a6f 100644
--- a/typo3/sysext/core/Classes/Page/PageLayoutResolver.php
+++ b/typo3/sysext/core/Classes/Page/PageLayoutResolver.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Page;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\View\BackendLayout\DataProviderCollection;
 use TYPO3\CMS\Backend\View\BackendLayout\DataProviderContext;
 use TYPO3\CMS\Backend\View\BackendLayout\DefaultDataProvider;
@@ -40,6 +41,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal This is not part of TYPO3 Core API.
  */
+#[Autoconfigure(public: true)]
 class PageLayoutResolver
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/RateLimiter/Storage/CachingFrameworkStorage.php b/typo3/sysext/core/Classes/RateLimiter/Storage/CachingFrameworkStorage.php
index e33bc53887a0..04808e1c25d7 100644
--- a/typo3/sysext/core/Classes/RateLimiter/Storage/CachingFrameworkStorage.php
+++ b/typo3/sysext/core/Classes/RateLimiter/Storage/CachingFrameworkStorage.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\RateLimiter\Storage;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\RateLimiter\LimiterStateInterface;
 use Symfony\Component\RateLimiter\Policy\SlidingWindow;
 use Symfony\Component\RateLimiter\Policy\TokenBucket;
@@ -30,6 +31,7 @@ use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
  *
  * @internal This is not part of the official TYPO3 Core API due to a limitation of the experimental Symfony Rate Limiter API.
  */
+#[Autoconfigure(public: true)]
 class CachingFrameworkStorage implements StorageInterface
 {
     private FrontendInterface $cacheInstance;
diff --git a/typo3/sysext/core/Classes/Resource/DefaultUploadFolderResolver.php b/typo3/sysext/core/Classes/Resource/DefaultUploadFolderResolver.php
index 3e21b11792c0..e9d928f5f70f 100644
--- a/typo3/sysext/core/Classes/Resource/DefaultUploadFolderResolver.php
+++ b/typo3/sysext/core/Classes/Resource/DefaultUploadFolderResolver.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Resource;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\EventDispatcher\EventDispatcher;
@@ -27,6 +28,7 @@ use TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException;
  * Finds the best matching upload folder for a specific backend user
  * when uploading or selecting files, based on UserTSconfig or PageTSconfig
  */
+#[Autoconfigure(public: true)]
 class DefaultUploadFolderResolver
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Resource/FileRepository.php b/typo3/sysext/core/Classes/Resource/FileRepository.php
index 9fec67f030ef..3b462e169901 100644
--- a/typo3/sysext/core/Classes/Resource/FileRepository.php
+++ b/typo3/sysext/core/Classes/Resource/FileRepository.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Resource;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Database\Connection;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
  * It is however recommended to use the ResourceFactory instead of this class,
  * as it is more flexible.
  */
+#[Autoconfigure(public: true)]
 class FileRepository
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php b/typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php
index d17d4058adfb..3a3fb5d0bc64 100644
--- a/typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php
+++ b/typo3/sysext/core/Classes/Resource/OnlineMedia/Processing/PreviewProcessing.php
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Core\Resource\OnlineMedia\Processing;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Resource\File;
 use TYPO3\CMS\Core\Resource\OnlineMedia\Event\AfterVideoPreviewFetchedEvent;
 use TYPO3\CMS\Core\Resource\OnlineMedia\Helpers\OnlineMediaHelperRegistry;
@@ -26,6 +27,7 @@ use TYPO3\CMS\Core\Resource\Processing\TaskInterface;
 /**
  * Preview of Online Media item Processing
  */
+#[Autoconfigure(public: true)]
 final class PreviewProcessing implements ProcessorInterface
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Resource/Security/SvgHookHandler.php b/typo3/sysext/core/Classes/Resource/Security/SvgHookHandler.php
index 7e0535b5dba5..6274f0fcab83 100644
--- a/typo3/sysext/core/Classes/Resource/Security/SvgHookHandler.php
+++ b/typo3/sysext/core/Classes/Resource/Security/SvgHookHandler.php
@@ -17,6 +17,9 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Resource\Security;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
+
+#[Autoconfigure(public: true)]
 class SvgHookHandler
 {
     /**
diff --git a/typo3/sysext/core/Classes/Resource/Security/SvgTypeCheck.php b/typo3/sysext/core/Classes/Resource/Security/SvgTypeCheck.php
index 66509f620564..2685da6c20bc 100644
--- a/typo3/sysext/core/Classes/Resource/Security/SvgTypeCheck.php
+++ b/typo3/sysext/core/Classes/Resource/Security/SvgTypeCheck.php
@@ -17,11 +17,13 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Resource\Security;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Resource\FileInterface;
 use TYPO3\CMS\Core\Resource\MimeTypeDetector;
 use TYPO3\CMS\Core\Type\File\FileInfo;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
+#[Autoconfigure(public: true)]
 class SvgTypeCheck
 {
     protected const MIME_TYPES = ['image/svg', 'image/svg+xml', 'application/svg', 'application/svg+xml'];
diff --git a/typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php b/typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php
index 539b0863a484..e94f29332fa7 100644
--- a/typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php
+++ b/typo3/sysext/core/Classes/Resource/Service/FileProcessingService.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\Resource\Service;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Resource\Driver\DriverInterface;
 use TYPO3\CMS\Core\Resource\Event\AfterFileProcessingEvent;
 use TYPO3\CMS\Core\Resource\Event\BeforeFileProcessingEvent;
@@ -42,6 +43,7 @@ use TYPO3\CMS\Core\Resource\Processing\TaskInterface;
  * to be processed. If processing is required, a valid Processor is searched for to process the
  * Task object (which is retrieved from ProcessedFile->getTask()).
  */
+#[Autoconfigure(public: true)]
 class FileProcessingService
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Routing/BackendEntryPointResolver.php b/typo3/sysext/core/Classes/Routing/BackendEntryPointResolver.php
index c658dc9335a4..9848ee76b8bc 100644
--- a/typo3/sysext/core/Classes/Routing/BackendEntryPointResolver.php
+++ b/typo3/sysext/core/Classes/Routing/BackendEntryPointResolver.php
@@ -19,12 +19,14 @@ namespace TYPO3\CMS\Core\Routing;
 
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\UriInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Http\NormalizedParams;
 use TYPO3\CMS\Core\Http\Uri;
 
 /**
  * This class helps to resolve the virtual path to the main entry point of the TYPO3 Backend.
  */
+#[Autoconfigure(public: true)]
 class BackendEntryPointResolver
 {
     protected string $entryPoint = '/typo3';
diff --git a/typo3/sysext/core/Classes/Routing/RequestContextFactory.php b/typo3/sysext/core/Classes/Routing/RequestContextFactory.php
index 9c8a6f7bf587..5289d62049f4 100644
--- a/typo3/sysext/core/Classes/Routing/RequestContextFactory.php
+++ b/typo3/sysext/core/Classes/Routing/RequestContextFactory.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Core\Routing;
 
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\UriInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Routing\RequestContext;
 use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
 
@@ -26,6 +27,7 @@ use TYPO3\CMS\Core\Site\Entity\SiteLanguage;
  * @internal this is not part of the TYPO3 Core public API, as it serves as an internal
  * bridge between symfony/routing component and PSR-7 requests
  */
+#[Autoconfigure(public: true)]
 class RequestContextFactory
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php b/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php
index 228b7017b244..a3b3d92ab48a 100644
--- a/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php
+++ b/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Core\Security\ContentSecurityPolicy;
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Http\Message\UriInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Core\RequestId;
 use TYPO3\CMS\Core\Http\NormalizedParams;
 use TYPO3\CMS\Core\Http\Uri;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Core\Site\SiteFinder;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 final class PolicyProvider
 {
     protected const REPORTING_URI = '@http-reporting';
diff --git a/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyRegistry.php b/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyRegistry.php
index a762b551407b..d1b806de48ca 100644
--- a/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyRegistry.php
+++ b/typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyRegistry.php
@@ -17,6 +17,8 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\Security\ContentSecurityPolicy;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
+
 /**
  * A shared service registry to hold additional adjustments that were collected during
  * processing the current request. For instance, it would be used to temporarily(!) allow
@@ -24,6 +26,7 @@ namespace TYPO3\CMS\Core\Security\ContentSecurityPolicy;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 final class PolicyRegistry
 {
     /**
diff --git a/typo3/sysext/core/Classes/TypoScript/AST/AstBuilder.php b/typo3/sysext/core/Classes/TypoScript/AST/AstBuilder.php
index c06b4510a74d..15b8e2ea4848 100644
--- a/typo3/sysext/core/Classes/TypoScript/AST/AstBuilder.php
+++ b/typo3/sysext/core/Classes/TypoScript/AST/AstBuilder.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Core\TypoScript\AST;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPath;
 use TYPO3\CMS\Core\TypoScript\AST\CurrentObjectPath\CurrentObjectPathStack;
 use TYPO3\CMS\Core\TypoScript\AST\Node\RootNode;
@@ -41,6 +42,7 @@ use TYPO3\CMS\Core\TypoScript\Tokenizer\Token\ConstantAwareTokenStream;
  *
  * @internal: Internal AST structure.
  */
+#[Autoconfigure(public: true)]
 final class AstBuilder extends AbstractAstBuilder implements AstBuilderInterface
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/TypoScript/IncludeTree/StringTreeBuilder.php b/typo3/sysext/core/Classes/TypoScript/IncludeTree/StringTreeBuilder.php
index 044d1d004889..3c5384ee4389 100644
--- a/typo3/sysext/core/Classes/TypoScript/IncludeTree/StringTreeBuilder.php
+++ b/typo3/sysext/core/Classes/TypoScript/IncludeTree/StringTreeBuilder.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\TypoScript\IncludeTree;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
 use TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\RootInclude;
 use TYPO3\CMS\Core\TypoScript\IncludeTree\IncludeNode\StringInclude;
@@ -32,6 +33,7 @@ use TYPO3\CMS\Core\TypoScript\Tokenizer\TokenizerInterface;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 final class StringTreeBuilder
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateRepository.php b/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateRepository.php
index 2a6f0429393e..ab7133da4da7 100644
--- a/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateRepository.php
+++ b/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateRepository.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Core\TypoScript\IncludeTree;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  *
  * @internal: Internal structure. There is optimization potential and especially getSysTemplateRowsByRootline() will probably vanish later.
  */
+#[Autoconfigure(public: true)]
 final class SysTemplateRepository
 {
     public function __construct(
diff --git a/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateTreeBuilder.php b/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateTreeBuilder.php
index 839719447bbc..795a3768ff2b 100644
--- a/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateTreeBuilder.php
+++ b/typo3/sysext/core/Classes/TypoScript/IncludeTree/SysTemplateTreeBuilder.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\TypoScript\IncludeTree;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
 use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Database\Connection;
@@ -70,6 +71,7 @@ use TYPO3\CMS\Core\Utility\PathUtility;
  *
  * @internal: Internal tree structure.
  */
+#[Autoconfigure(public: true)]
 final class SysTemplateTreeBuilder
 {
     /**
diff --git a/typo3/sysext/core/Classes/TypoScript/IncludeTree/TsConfigTreeBuilder.php b/typo3/sysext/core/Classes/TypoScript/IncludeTree/TsConfigTreeBuilder.php
index 9cfd47b2e77a..ff7bf168c05a 100644
--- a/typo3/sysext/core/Classes/TypoScript/IncludeTree/TsConfigTreeBuilder.php
+++ b/typo3/sysext/core/Classes/TypoScript/IncludeTree/TsConfigTreeBuilder.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Core\TypoScript\IncludeTree;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
 use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
 use TYPO3\CMS\Core\Core\Environment;
@@ -42,6 +43,7 @@ use TYPO3\CMS\Core\Utility\PathUtility;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 final class TsConfigTreeBuilder
 {
     public function __construct(
diff --git a/typo3/sysext/core/Configuration/Services.yaml b/typo3/sysext/core/Configuration/Services.yaml
index 4ce9b6228c43..5b4acf42bb18 100644
--- a/typo3/sysext/core/Configuration/Services.yaml
+++ b/typo3/sysext/core/Configuration/Services.yaml
@@ -59,48 +59,12 @@ services:
         command: 'extension:setup'
         schedulable: false
 
-  TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools:
-    public: true
-
   TYPO3\CMS\Core\Package\UnitTestPackageManager:
     autoconfigure: false
 
   TYPO3\CMS\Core\Http\MiddlewareDispatcher:
     autoconfigure: false
 
-  TYPO3\CMS\Core\Database\ReferenceIndex:
-    public: true
-
-  TYPO3\CMS\Core\DataHandling\ItemProcessingService:
-    public: true
-
-  TYPO3\CMS\Core\Database\Schema\SqlReader:
-    public: true
-
-  TYPO3\CMS\Core\Html\RteHtmlParser:
-    public: true
-
-  TYPO3\CMS\Core\LinkHandling\TypoLinkCodecService:
-    public: true
-
-  TYPO3\CMS\Core\Mail\Mailer:
-    public: true
-
-  TYPO3\CMS\Core\Controller\FileDumpController:
-    public: true
-
-  TYPO3\CMS\Core\Controller\PasswordGeneratorController:
-    public: true
-
-  TYPO3\CMS\Core\Localization\TcaSystemLanguageCollector:
-    public: true
-
-  TYPO3\CMS\Core\Authentication\Mfa\MfaProviderRegistry:
-    public: true
-
-  TYPO3\CMS\Core\RateLimiter\Storage\CachingFrameworkStorage:
-    public: true
-
   TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider:
     tags:
       - name: mfa.provider
@@ -135,12 +99,6 @@ services:
     shared: false
     public: true
 
-  TYPO3\CMS\Core\Routing\BackendEntryPointResolver:
-    public: true
-
-  TYPO3\CMS\Core\Routing\RequestContextFactory:
-    public: true
-
   TYPO3\CMS\Core\Routing\Enhancer\VariableProcessor:
     public: true
     shared: false
@@ -148,9 +106,6 @@ services:
   TYPO3\CMS\Core\Routing\Enhancer\VariableProcessorCache:
     shared: true
 
-  TYPO3\CMS\Core\Package\PackageActivationService:
-    public: true
-
   # Soft Reference Parsers
   TYPO3\CMS\Core\DataHandling\SoftReference\SubstituteSoftReferenceParser:
     tags:
@@ -182,59 +137,14 @@ services:
       - name: softreference.parser
         parserKey: url
 
-  TYPO3\CMS\Core\ExpressionLanguage\DefaultProvider:
-    public: true
-
-  TYPO3\CMS\Core\Locking\ResourceMutex:
-    public: true
-
-  TYPO3\CMS\Core\Page\PageLayoutResolver:
-    public: true
-
   TYPO3\CMS\Core\Page\AssetRenderer:
     public: true
     arguments:
       $eventDispatcher: '@Psr\EventDispatcher\EventDispatcherInterface'
 
-  TYPO3\CMS\Core\Resource\FileRepository:
-    public: true
-
-  TYPO3\CMS\Core\Resource\Service\FileProcessingService:
-    public: true
-
-  TYPO3\CMS\Core\Resource\DefaultUploadFolderResolver:
-    public: true
-
-  TYPO3\CMS\Core\Resource\Security\SvgHookHandler:
-    public: true
-
-  TYPO3\CMS\Core\Resource\Security\SvgTypeCheck:
-    public: true
-
-  TYPO3\CMS\Core\Resource\OnlineMedia\Processing\PreviewProcessing:
-    public: true
-
-  TYPO3\CMS\Core\Domain\Access\RecordAccessVoter:
-    public: true
-
   TYPO3\CMS\Core\TypoScript\AST\AstBuilderInterface:
     alias: TYPO3\CMS\Core\TypoScript\AST\AstBuilder
 
-  TYPO3\CMS\Core\TypoScript\AST\AstBuilder:
-    public: true
-
-  TYPO3\CMS\Core\TypoScript\IncludeTree\StringTreeBuilder:
-    public: true
-
-  TYPO3\CMS\Core\TypoScript\IncludeTree\SysTemplateRepository:
-    public: true
-
-  TYPO3\CMS\Core\TypoScript\IncludeTree\SysTemplateTreeBuilder:
-    public: true
-
-  TYPO3\CMS\Core\TypoScript\IncludeTree\TsConfigTreeBuilder:
-    public: true
-
   TYPO3\CMS\Core\TypoScript\IncludeTree\Visitor\IncludeTreeAstBuilderVisitor:
     public: true
     # Ast builder visitor creates state and should not be re-used
@@ -417,12 +327,6 @@ services:
     arguments:
       $staticMutations: '@content.security.policies'
 
-  TYPO3\CMS\Core\Security\ContentSecurityPolicy\PolicyProvider:
-    public: true
-
-  TYPO3\CMS\Core\Security\ContentSecurityPolicy\PolicyRegistry:
-    public: true
-
   # External dependencies
 
   GuzzleHttp\Client:
diff --git a/typo3/sysext/extensionmanager/Classes/Domain/Repository/BulkExtensionRepositoryWriter.php b/typo3/sysext/extensionmanager/Classes/Domain/Repository/BulkExtensionRepositoryWriter.php
index db6d1cb31845..e4d4313d7e51 100644
--- a/typo3/sysext/extensionmanager/Classes/Domain/Repository/BulkExtensionRepositoryWriter.php
+++ b/typo3/sysext/extensionmanager/Classes/Domain/Repository/BulkExtensionRepositoryWriter.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Extensionmanager\Domain\Repository;
 
 use Doctrine\DBAL\Exception as DBALException;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Platform\PlatformInformation;
@@ -30,6 +31,7 @@ use TYPO3\CMS\Extensionmanager\Parser\ExtensionXmlParser;
  *
  * @internal This class is a specific domain repository implementation and is not part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class BulkExtensionRepositoryWriter implements \SplObserver
 {
     /**
diff --git a/typo3/sysext/extensionmanager/Classes/Remote/RemoteRegistry.php b/typo3/sysext/extensionmanager/Classes/Remote/RemoteRegistry.php
index d95fe0435f09..084b564b3d73 100644
--- a/typo3/sysext/extensionmanager/Classes/Remote/RemoteRegistry.php
+++ b/typo3/sysext/extensionmanager/Classes/Remote/RemoteRegistry.php
@@ -17,11 +17,14 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Extensionmanager\Remote;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
+
 /**
  * Registry of remote connectors.
  *
  * @internal This class is a specific implementation and is not part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class RemoteRegistry
 {
     /**
diff --git a/typo3/sysext/extensionmanager/Configuration/Services.yaml b/typo3/sysext/extensionmanager/Configuration/Services.yaml
index 133c01f1f56d..e8c5cbef483d 100644
--- a/typo3/sysext/extensionmanager/Configuration/Services.yaml
+++ b/typo3/sysext/extensionmanager/Configuration/Services.yaml
@@ -42,9 +42,6 @@ services:
         alias: true
         schedulable: false
 
-  TYPO3\CMS\Extensionmanager\Remote\RemoteRegistry:
-    public: true
-
   TYPO3\CMS\Extensionmanager\Report\ExtensionComposerStatus:
     public: true
     tags:
@@ -54,9 +51,6 @@ services:
     tags:
       - name: reports.status
 
-  TYPO3\CMS\Extensionmanager\Domain\Repository\BulkExtensionRepositoryWriter:
-    public: true
-
   extension.remote.ter:
     class: 'TYPO3\CMS\Extensionmanager\Remote\TerExtensionRemote'
     arguments:
diff --git a/typo3/sysext/form/Classes/Mvc/Configuration/TypoScriptService.php b/typo3/sysext/form/Classes/Mvc/Configuration/TypoScriptService.php
index a7fd96bcccf6..10dc61c44eac 100644
--- a/typo3/sysext/form/Classes/Mvc/Configuration/TypoScriptService.php
+++ b/typo3/sysext/form/Classes/Mvc/Configuration/TypoScriptService.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Form\Mvc\Configuration;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\TypoScript\TypoScriptService as CoreTypoScriptService;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 
@@ -25,6 +26,7 @@ use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
  *
  * Scope: frontend
  */
+#[Autoconfigure(public: true)]
 class TypoScriptService
 {
     protected CoreTypoScriptService $coreTypoScriptService;
diff --git a/typo3/sysext/form/Classes/Mvc/Property/PropertyMappingConfiguration.php b/typo3/sysext/form/Classes/Mvc/Property/PropertyMappingConfiguration.php
index 33f7c64d7265..6d3775e5456b 100644
--- a/typo3/sysext/form/Classes/Mvc/Property/PropertyMappingConfiguration.php
+++ b/typo3/sysext/form/Classes/Mvc/Property/PropertyMappingConfiguration.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Form\Mvc\Property;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Form\Mvc\Validation\MimeTypeValidator;
  * Scope: frontend
  * @internal
  */
+#[Autoconfigure(public: true)]
 class PropertyMappingConfiguration implements AfterFormStateInitializedInterface
 {
     public function __construct(protected readonly ValidatorResolver $validatorResolver) {}
diff --git a/typo3/sysext/form/Configuration/Services.yaml b/typo3/sysext/form/Configuration/Services.yaml
index 0277b54f1ac8..60878ac1f71b 100644
--- a/typo3/sysext/form/Configuration/Services.yaml
+++ b/typo3/sysext/form/Configuration/Services.yaml
@@ -12,9 +12,6 @@ services:
     alias: TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManager
     public: true
 
-  TYPO3\CMS\Form\Mvc\Configuration\TypoScriptService:
-    public: true
-
   TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManagerInterface:
     alias: TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManager
     public: true
@@ -35,9 +32,6 @@ services:
     public: true
     shared: false
 
-  TYPO3\CMS\Form\Mvc\Property\PropertyMappingConfiguration:
-    public: true
-
   TYPO3\CMS\Form\SoftReference\FormPersistenceIdentifierSoftReferenceParser:
     tags:
       - name: softreference.parser
diff --git a/typo3/sysext/frontend/Classes/ContentObject/ContentDataProcessor.php b/typo3/sysext/frontend/Classes/ContentObject/ContentDataProcessor.php
index 343de55edd9a..d319d8ab6854 100644
--- a/typo3/sysext/frontend/Classes/ContentObject/ContentDataProcessor.php
+++ b/typo3/sysext/frontend/Classes/ContentObject/ContentDataProcessor.php
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Frontend\ContentObject;
 
 use Psr\Container\ContainerInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Frontend\DataProcessing\DataProcessorRegistry;
@@ -23,6 +24,7 @@ use TYPO3\CMS\Frontend\DataProcessing\DataProcessorRegistry;
 /**
  * A class that contains methods that can be used to use the dataProcessing functionality
  */
+#[Autoconfigure(public: true)]
 class ContentDataProcessor
 {
     public function __construct(
diff --git a/typo3/sysext/frontend/Classes/Controller/ShowImageController.php b/typo3/sysext/frontend/Classes/Controller/ShowImageController.php
index 92569baad961..4fa70dc1eefa 100644
--- a/typo3/sysext/frontend/Classes/Controller/ShowImageController.php
+++ b/typo3/sysext/frontend/Classes/Controller/ShowImageController.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Frontend\Controller;
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Configuration\Features;
 use TYPO3\CMS\Core\Crypto\HashService;
 use TYPO3\CMS\Core\Exception;
@@ -47,6 +48,7 @@ use TYPO3\CMS\Core\Utility\MathUtility;
  *
  * @internal this is a concrete TYPO3 implementation and solely used for EXT:frontend and not part of TYPO3's Core API.
  */
+#[Autoconfigure(public: true)]
 class ShowImageController
 {
     protected const ALLOWED_PARAMETER_NAMES = ['width', 'height', 'crop', 'bodyTag', 'title'];
diff --git a/typo3/sysext/frontend/Classes/Html/HtmlWorker.php b/typo3/sysext/frontend/Classes/Html/HtmlWorker.php
index adf53bd618c5..6efc2cbf97d8 100644
--- a/typo3/sysext/frontend/Classes/Html/HtmlWorker.php
+++ b/typo3/sysext/frontend/Classes/Html/HtmlWorker.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Frontend\Html;
 
 use Masterminds\HTML5;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Security\ContentSecurityPolicy\ConsumableNonce;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Frontend\Typolink\LinkFactory;
@@ -26,6 +27,7 @@ use TYPO3\CMS\Frontend\Typolink\UnableToLinkException;
 /**
  * @internal API still might change
  */
+#[Autoconfigure(public: true)]
 class HtmlWorker
 {
     /**
diff --git a/typo3/sysext/frontend/Classes/Resource/PublicUrlPrefixer.php b/typo3/sysext/frontend/Classes/Resource/PublicUrlPrefixer.php
index 7fa7ad6ac714..4d2fe14589b9 100644
--- a/typo3/sysext/frontend/Classes/Resource/PublicUrlPrefixer.php
+++ b/typo3/sysext/frontend/Classes/Resource/PublicUrlPrefixer.php
@@ -17,11 +17,13 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Frontend\Resource;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Resource\Event\GeneratePublicUrlForResourceEvent;
 use TYPO3\CMS\Core\Resource\ResourceInterface;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
 
+#[Autoconfigure(public: true)]
 class PublicUrlPrefixer
 {
     /**
diff --git a/typo3/sysext/frontend/Configuration/Services.yaml b/typo3/sysext/frontend/Configuration/Services.yaml
index ec363a55bfff..8b0cc1129f88 100644
--- a/typo3/sysext/frontend/Configuration/Services.yaml
+++ b/typo3/sysext/frontend/Configuration/Services.yaml
@@ -11,12 +11,6 @@ services:
     # (e.g. because factories are to be used instead)
     exclude: '../Classes/{Frontend/Controller/TypoScriptFrontendController.php}'
 
-  TYPO3\CMS\Frontend\Controller\ShowImageController:
-    public: true
-
-  TYPO3\CMS\Frontend\ContentObject\ContentDataProcessor:
-    public: true
-
   TYPO3\CMS\Frontend\ContentObject\ContentObjectFactory:
     public: true
     arguments: [!tagged_locator { tag: 'frontend.contentobject', index_by: 'identifier' }]
@@ -34,18 +28,12 @@ services:
   TYPO3\CMS\Frontend\DataProcessing\DataProcessorRegistry:
     arguments: [!tagged_locator { tag: 'data.processor', index_by: 'identifier' }]
 
-  TYPO3\CMS\Frontend\Resource\PublicUrlPrefixer:
-    public: true
-
   TYPO3\CMS\Frontend\Resource\FileCollector:
     public: true
     # @todo The file collector is used for intermediate collection in scoped places. Therefore, the collector can't be
     # @todo shared. Evaluate if the collector can be build scope aware and made sharable again.
     shared: false
 
-  TYPO3\CMS\Frontend\Html\HtmlWorker:
-    public: true
-
   # Register all available content objects
   TYPO3\CMS\Frontend\ContentObject\TextContentObject:
     tags:
diff --git a/typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php b/typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
index b54dea100b14..ec0f8c4878f3 100644
--- a/typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
+++ b/typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Linkvalidator;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -35,6 +36,7 @@ use TYPO3\CMS\Linkvalidator\Repository\BrokenLinkRepository;
  * This class provides Processing plugin implementation
  * @internal
  */
+#[Autoconfigure(public: true)]
 class LinkAnalyzer
 {
     /**
diff --git a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
index cdbbe04a5258..5310ffdb990b 100644
--- a/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
+++ b/typo3/sysext/linkvalidator/Classes/Linktype/ExternalLinktype.php
@@ -23,6 +23,7 @@ use GuzzleHttp\Exception\ConnectException;
 use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Exception\ServerException;
 use GuzzleHttp\Exception\TooManyRedirectsException;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Http\RequestFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\HttpUtility;
@@ -36,6 +37,7 @@ use TYPO3\CMS\Linkvalidator\LinkAnalyzer;
  * - no caching of results (except for a runtime cache during link checking which will be invalid on next run)
  * see "Known Problems" in the linkvalidator documentation
  */
+#[Autoconfigure(public: true)]
 class ExternalLinktype extends AbstractLinktype
 {
     // HTTP status code was delivered (and can be found in $errorParams['errno'])
diff --git a/typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php b/typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php
index fd86c9903761..28c7b4508786 100644
--- a/typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php
+++ b/typo3/sysext/linkvalidator/Classes/Repository/BrokenLinkRepository.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Linkvalidator\Repository;
 
 use Doctrine\DBAL\Exception\TableNotFoundException;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Platform\PlatformInformation;
@@ -28,6 +29,7 @@ use TYPO3\CMS\Linkvalidator\QueryRestrictions\EditableRestriction;
 /**
  * Repository for finding broken links that were detected previously.
  */
+#[Autoconfigure(public: true)]
 class BrokenLinkRepository
 {
     protected const TABLE = 'tx_linkvalidator_link';
diff --git a/typo3/sysext/linkvalidator/Classes/Result/LinkAnalyzerResult.php b/typo3/sysext/linkvalidator/Classes/Result/LinkAnalyzerResult.php
index 1c3070a13bc5..6cdfbafbaf3f 100644
--- a/typo3/sysext/linkvalidator/Classes/Result/LinkAnalyzerResult.php
+++ b/typo3/sysext/linkvalidator/Classes/Result/LinkAnalyzerResult.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Linkvalidator\Result;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Linkvalidator\Repository\PagesRepository;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class LinkAnalyzerResult
 {
     protected array $brokenLinks = [];
diff --git a/typo3/sysext/linkvalidator/Configuration/Services.yaml b/typo3/sysext/linkvalidator/Configuration/Services.yaml
index 84c61684a335..01b08b4a0ead 100644
--- a/typo3/sysext/linkvalidator/Configuration/Services.yaml
+++ b/typo3/sysext/linkvalidator/Configuration/Services.yaml
@@ -9,18 +9,6 @@ services:
     # Tasks require EXT:scheduler to be installed, ignore for now.
     exclude: '../Classes/Task'
 
-  TYPO3\CMS\Linkvalidator\LinkAnalyzer:
-    public: true
-
-  TYPO3\CMS\Linkvalidator\Linktype\ExternalLinktype:
-    public: true
-
-  TYPO3\CMS\Linkvalidator\Repository\BrokenLinkRepository:
-    public: true
-
-  TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult:
-    public: true
-
   # Linktype registry
   TYPO3\CMS\Linkvalidator\Linktype\LinktypeRegistry:
     public: true
diff --git a/typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/ProviderRegistry.php b/typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/ProviderRegistry.php
index 468d92a7348d..2cf12f294682 100644
--- a/typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/ProviderRegistry.php
+++ b/typo3/sysext/lowlevel/Classes/ConfigurationModuleProvider/ProviderRegistry.php
@@ -17,9 +17,12 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Lowlevel\ConfigurationModuleProvider;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
+
 /**
  * Registry for configuration providers which is called by the ConfigurationProviderPass
  */
+#[Autoconfigure(public: true)]
 final class ProviderRegistry
 {
     /**
diff --git a/typo3/sysext/lowlevel/Configuration/Services.yaml b/typo3/sysext/lowlevel/Configuration/Services.yaml
index 72fe889a7816..4191e26d649f 100644
--- a/typo3/sysext/lowlevel/Configuration/Services.yaml
+++ b/typo3/sysext/lowlevel/Configuration/Services.yaml
@@ -14,9 +14,6 @@ services:
         description: 'Show entries from the sys_log database table of the last 24 hours.'
         schedulable: false
 
-  TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\ProviderRegistry:
-    public: true
-
   lowlevel.configuration.module.provider.confvars:
     class: 'TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\GlobalVariableProvider'
     tags:
diff --git a/typo3/sysext/redirects/Classes/Hooks/DataHandlerSlugUpdateHook.php b/typo3/sysext/redirects/Classes/Hooks/DataHandlerSlugUpdateHook.php
index 4ca300faaffd..7bdbb65fe1e3 100644
--- a/typo3/sysext/redirects/Classes/Hooks/DataHandlerSlugUpdateHook.php
+++ b/typo3/sysext/redirects/Classes/Hooks/DataHandlerSlugUpdateHook.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Redirects\Hooks;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
 use TYPO3\CMS\Core\Utility\MathUtility;
 use TYPO3\CMS\Redirects\RedirectUpdate\SlugRedirectChangeItem;
@@ -26,6 +27,7 @@ use TYPO3\CMS\Redirects\Service\SlugService;
 /**
  * @internal This class is a specific TYPO3 hook implementation and is not part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class DataHandlerSlugUpdateHook
 {
     /**
diff --git a/typo3/sysext/redirects/Classes/Report/Status/RedirectStatus.php b/typo3/sysext/redirects/Classes/Report/Status/RedirectStatus.php
index d82e5fc998a3..3c30d07a6663 100644
--- a/typo3/sysext/redirects/Classes/Report/Status/RedirectStatus.php
+++ b/typo3/sysext/redirects/Classes/Report/Status/RedirectStatus.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Redirects\Report\Status;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\View\BackendViewFactory;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Registry;
@@ -33,6 +34,7 @@ use TYPO3\CMS\Reports\StatusProviderInterface;
 /**
  * Performs checks regarding redirects
  */
+#[Autoconfigure(public: true)]
 class RedirectStatus implements StatusProviderInterface, RequestAwareStatusProviderInterface
 {
     public function __construct(
diff --git a/typo3/sysext/redirects/Configuration/Services.yaml b/typo3/sysext/redirects/Configuration/Services.yaml
index 0b021b02588b..40e95b3597ad 100644
--- a/typo3/sysext/redirects/Configuration/Services.yaml
+++ b/typo3/sysext/redirects/Configuration/Services.yaml
@@ -15,12 +15,6 @@ services:
     arguments:
       - 'redirects'
 
-  TYPO3\CMS\Redirects\Report\Status\RedirectStatus:
-    public: true
-
-  TYPO3\CMS\Redirects\Hooks\DataHandlerSlugUpdateHook:
-    public: true
-
   TYPO3\CMS\Redirects\Configuration\CheckIntegrityConfiguration:
     arguments:
       $extensionConfiguration: '@extension.configuration.redirects'
diff --git a/typo3/sysext/reports/Classes/Report/Status/Status.php b/typo3/sysext/reports/Classes/Report/Status/Status.php
index f67ca13d6f4f..93e6bd358021 100644
--- a/typo3/sysext/reports/Classes/Report/Status/Status.php
+++ b/typo3/sysext/reports/Classes/Report/Status/Status.php
@@ -16,6 +16,7 @@
 namespace TYPO3\CMS\Reports\Report\Status;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\View\BackendViewFactory;
 use TYPO3\CMS\Core\Localization\LanguageService;
 use TYPO3\CMS\Core\Registry;
@@ -30,6 +31,7 @@ use TYPO3\CMS\Reports\Status as ReportStatus;
 /**
  * The status report
  */
+#[Autoconfigure(public: true)]
 class Status implements RequestAwareReportInterface
 {
     /**
diff --git a/typo3/sysext/reports/Configuration/Services.yaml b/typo3/sysext/reports/Configuration/Services.yaml
index 4df44ad6f3c6..56cce078ebe3 100644
--- a/typo3/sysext/reports/Configuration/Services.yaml
+++ b/typo3/sysext/reports/Configuration/Services.yaml
@@ -9,9 +9,6 @@ services:
     # Tasks require EXT:scheduler to be installed, ignore for now.
     exclude: '../Classes/Task'
 
-  TYPO3\CMS\Reports\Report\Status\Status:
-    public: true
-
   TYPO3\CMS\Reports\Registry\StatusRegistry:
     arguments:
       - !tagged_iterator reports.status
diff --git a/typo3/sysext/scheduler/Classes/Domain/Repository/SchedulerTaskRepository.php b/typo3/sysext/scheduler/Classes/Domain/Repository/SchedulerTaskRepository.php
index 25fcf7ebe712..b18335115d07 100644
--- a/typo3/sysext/scheduler/Classes/Domain/Repository/SchedulerTaskRepository.php
+++ b/typo3/sysext/scheduler/Classes/Domain/Repository/SchedulerTaskRepository.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Scheduler\Domain\Repository;
 
 use Doctrine\DBAL\Exception as DBALException;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Core\Environment;
 use TYPO3\CMS\Core\Database\Connection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
@@ -32,6 +33,7 @@ use TYPO3\CMS\Scheduler\Validation\Validator\TaskValidator;
 /**
  * Repository class to fetch tasks available in the systems ready to be executed
  */
+#[Autoconfigure(public: true)]
 class SchedulerTaskRepository
 {
     protected const TABLE_NAME = 'tx_scheduler_task';
diff --git a/typo3/sysext/scheduler/Configuration/Services.yaml b/typo3/sysext/scheduler/Configuration/Services.yaml
index 6f901858df46..f41eec9ad5be 100644
--- a/typo3/sysext/scheduler/Configuration/Services.yaml
+++ b/typo3/sysext/scheduler/Configuration/Services.yaml
@@ -7,9 +7,6 @@ services:
   TYPO3\CMS\Scheduler\:
     resource: '../Classes/*'
 
-  TYPO3\CMS\Scheduler\Domain\Repository\SchedulerTaskRepository:
-    public: true
-
   TYPO3\CMS\Scheduler\Command\SchedulerCommand:
     tags:
       - name: 'console.command'
diff --git a/typo3/sysext/seo/Classes/Canonical/CanonicalGenerator.php b/typo3/sysext/seo/Classes/Canonical/CanonicalGenerator.php
index cf8a3c579241..0b7e0c7afc95 100644
--- a/typo3/sysext/seo/Classes/Canonical/CanonicalGenerator.php
+++ b/typo3/sysext/seo/Classes/Canonical/CanonicalGenerator.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Seo\Canonical;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Domain\Page;
 use TYPO3\CMS\Core\Domain\Repository\PageRepository;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -33,6 +34,7 @@ use TYPO3\CMS\Seo\Exception\CanonicalGenerationDisabledException;
  *
  * @internal this class is not part of TYPO3's Core API.
  */
+#[Autoconfigure(public: true)]
 readonly class CanonicalGenerator
 {
     public function __construct(
diff --git a/typo3/sysext/seo/Classes/MetaTag/MetaTagGenerator.php b/typo3/sysext/seo/Classes/MetaTag/MetaTagGenerator.php
index 2d3c2dc86fd6..3db1110ae1ca 100644
--- a/typo3/sysext/seo/Classes/MetaTag/MetaTagGenerator.php
+++ b/typo3/sysext/seo/Classes/MetaTag/MetaTagGenerator.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Seo\MetaTag;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection;
 use TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry;
 use TYPO3\CMS\Core\Resource\FileInterface;
@@ -32,6 +33,7 @@ use TYPO3\CMS\Frontend\Resource\FileCollector;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 readonly class MetaTagGenerator
 {
     public function __construct(
diff --git a/typo3/sysext/seo/Classes/XmlSitemap/XmlSitemapRenderer.php b/typo3/sysext/seo/Classes/XmlSitemap/XmlSitemapRenderer.php
index d005b7b10117..3850e6513ad0 100644
--- a/typo3/sysext/seo/Classes/XmlSitemap/XmlSitemapRenderer.php
+++ b/typo3/sysext/seo/Classes/XmlSitemap/XmlSitemapRenderer.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Seo\XmlSitemap;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Http\PropagateResponseException;
 use TYPO3\CMS\Core\TypoScript\TypoScriptService;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -32,6 +33,7 @@ use TYPO3Fluid\Fluid\View\TemplateView;
  *
  * @internal this class is not part of TYPO3's Core API.
  */
+#[Autoconfigure(public: true)]
 final class XmlSitemapRenderer
 {
     public function __construct(
diff --git a/typo3/sysext/seo/Configuration/Services.yaml b/typo3/sysext/seo/Configuration/Services.yaml
index 38f95453bf81..db392d379d32 100644
--- a/typo3/sysext/seo/Configuration/Services.yaml
+++ b/typo3/sysext/seo/Configuration/Services.yaml
@@ -7,15 +7,6 @@ services:
   TYPO3\CMS\Seo\:
     resource: '../Classes/*'
 
-  TYPO3\CMS\Seo\MetaTag\MetaTagGenerator:
-    public: true
-
-  TYPO3\CMS\Seo\Canonical\CanonicalGenerator:
-    public: true
-
-  TYPO3\CMS\Seo\XmlSitemap\XmlSitemapRenderer:
-    public: true
-
   TYPO3\CMS\Seo\Widgets\Provider\PagesWithoutDescriptionDataProvider:
     arguments:
       $excludedDoktypes: [ 3, 4, 6, 7, 199, 254 ]
diff --git a/typo3/sysext/webhooks/Classes/Listener/MessageListener.php b/typo3/sysext/webhooks/Classes/Listener/MessageListener.php
index ea7ec257fcb8..d3f8acd53aab 100644
--- a/typo3/sysext/webhooks/Classes/Listener/MessageListener.php
+++ b/typo3/sysext/webhooks/Classes/Listener/MessageListener.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Webhooks\Listener;
 
 use Psr\Log\LoggerInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Messenger\MessageBusInterface;
 use TYPO3\CMS\Webhooks\Message\WebhookMessageFactory;
 
@@ -29,6 +30,7 @@ use TYPO3\CMS\Webhooks\Message\WebhookMessageFactory;
  *
  * @internal not part of TYPO3 Core API
  */
+#[Autoconfigure(public: true)]
 class MessageListener
 {
     public function __construct(
diff --git a/typo3/sysext/webhooks/Classes/Listener/PageModificationListener.php b/typo3/sysext/webhooks/Classes/Listener/PageModificationListener.php
index b200846d9cc8..f932e7a8adf4 100644
--- a/typo3/sysext/webhooks/Classes/Listener/PageModificationListener.php
+++ b/typo3/sysext/webhooks/Classes/Listener/PageModificationListener.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Webhooks\Listener;
 
 use Psr\Log\LoggerInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Messenger\MessageBusInterface;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\DataHandling\DataHandler;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Webhooks\Message\PageModificationMessage;
  *
  * @internal not part of TYPO3 Core API
  */
+#[Autoconfigure(public: true)]
 class PageModificationListener
 {
     public function __construct(
diff --git a/typo3/sysext/webhooks/Classes/Tca/ItemsProcFunc/WebhookTypesItemsProcFunc.php b/typo3/sysext/webhooks/Classes/Tca/ItemsProcFunc/WebhookTypesItemsProcFunc.php
index 04d04528eac4..0c417dd38457 100644
--- a/typo3/sysext/webhooks/Classes/Tca/ItemsProcFunc/WebhookTypesItemsProcFunc.php
+++ b/typo3/sysext/webhooks/Classes/Tca/ItemsProcFunc/WebhookTypesItemsProcFunc.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Webhooks\Tca\ItemsProcFunc;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
 use TYPO3\CMS\Webhooks\WebhookTypesRegistry;
 
@@ -25,6 +26,7 @@ use TYPO3\CMS\Webhooks\WebhookTypesRegistry;
  *
  * @internal not part of TYPO3's Core API
  */
+#[Autoconfigure(public: true)]
 class WebhookTypesItemsProcFunc
 {
     public function __construct(
diff --git a/typo3/sysext/webhooks/Classes/WebhookTypesRegistry.php b/typo3/sysext/webhooks/Classes/WebhookTypesRegistry.php
index 06b12d1130dc..c371dda8df61 100644
--- a/typo3/sysext/webhooks/Classes/WebhookTypesRegistry.php
+++ b/typo3/sysext/webhooks/Classes/WebhookTypesRegistry.php
@@ -17,6 +17,7 @@ declare(strict_types=1);
 
 namespace TYPO3\CMS\Webhooks;
 
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Webhooks\Model\WebhookType;
 
 /**
@@ -25,6 +26,7 @@ use TYPO3\CMS\Webhooks\Model\WebhookType;
  *
  * @internal not part of TYPO3's Core API
  */
+#[Autoconfigure(public: true)]
 class WebhookTypesRegistry
 {
     /**
diff --git a/typo3/sysext/webhooks/Configuration/Services.yaml b/typo3/sysext/webhooks/Configuration/Services.yaml
index a9258a1f5b8b..ca84888b364d 100644
--- a/typo3/sysext/webhooks/Configuration/Services.yaml
+++ b/typo3/sysext/webhooks/Configuration/Services.yaml
@@ -6,16 +6,3 @@ services:
 
   TYPO3\CMS\Webhooks\:
     resource: '../Classes/*'
-
-  TYPO3\CMS\Webhooks\WebhookTypesRegistry:
-    public: true
-
-  TYPO3\CMS\Webhooks\Listener\PageModificationListener:
-    public: true
-
-  # public true is required in ajax backend calls (e.g. when adding a file)
-  TYPO3\CMS\Webhooks\Listener\MessageListener:
-    public: true
-
-  TYPO3\CMS\Webhooks\Tca\ItemsProcFunc\WebhookTypesItemsProcFunc:
-    public: true
diff --git a/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php b/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
index 03e6e1f61407..a8b0ead67636 100644
--- a/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
+++ b/typo3/sysext/workspaces/Classes/Controller/Remote/ActionHandler.php
@@ -18,6 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Workspaces\Controller\Remote;
 
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\View\BackendViewFactory;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
@@ -34,6 +35,7 @@ use TYPO3\CMS\Workspaces\Service\WorkspaceService;
 /**
  * @internal This is a specific Backend Controller implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class ActionHandler
 {
     public function __construct(
diff --git a/typo3/sysext/workspaces/Classes/Controller/Remote/RemoteServer.php b/typo3/sysext/workspaces/Classes/Controller/Remote/RemoteServer.php
index 35171f0626c1..933e51385f12 100644
--- a/typo3/sysext/workspaces/Classes/Controller/Remote/RemoteServer.php
+++ b/typo3/sysext/workspaces/Classes/Controller/Remote/RemoteServer.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Workspaces\Controller\Remote;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Backend\Avatar\Avatar;
 use TYPO3\CMS\Backend\Form\FormDataCompiler;
 use TYPO3\CMS\Backend\Form\FormDataGroup\TcaDatabaseRecord;
@@ -51,6 +52,7 @@ use TYPO3\CMS\Workspaces\Service\WorkspaceService;
 /**
  * @internal This is a specific Backend Controller implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class RemoteServer
 {
     use LogDataTrait;
diff --git a/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php b/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
index 626295555f67..dbf1b3936c67 100644
--- a/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
+++ b/typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Workspaces\Hook;
 
 use Doctrine\DBAL\Exception as DBALException;
 use Psr\EventDispatcher\EventDispatcherInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Messenger\MessageBusInterface;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
@@ -47,6 +48,7 @@ use TYPO3\CMS\Workspaces\Service\WorkspaceService;
  * to interact with the TYPO3 Core Engine
  * @internal This is a specific hook implementation and is not considered part of the Public TYPO3 API.
  */
+#[Autoconfigure(public: true)]
 class DataHandlerHook
 {
     /**
diff --git a/typo3/sysext/workspaces/Classes/Notification/StageChangeNotification.php b/typo3/sysext/workspaces/Classes/Notification/StageChangeNotification.php
index 165e35c8ff84..c7bdee47bd8e 100644
--- a/typo3/sysext/workspaces/Classes/Notification/StageChangeNotification.php
+++ b/typo3/sysext/workspaces/Classes/Notification/StageChangeNotification.php
@@ -20,6 +20,7 @@ namespace TYPO3\CMS\Workspaces\Notification;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use Symfony\Component\Mailer\Exception\TransportException;
 use Symfony\Component\Mime\Address;
 use Symfony\Component\Mime\Exception\RfcComplianceException;
@@ -39,6 +40,7 @@ use TYPO3\CMS\Workspaces\Service\StagesService;
  *
  * @internal This is a concrete implementation of sending out emails, and not part of the public TYPO3 Core API
  */
+#[Autoconfigure(public: true)]
 class StageChangeNotification implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php b/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php
index 4de2f5423043..b4dcce013e09 100644
--- a/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php
+++ b/typo3/sysext/workspaces/Classes/Preview/PreviewUriBuilder.php
@@ -19,6 +19,7 @@ namespace TYPO3\CMS\Workspaces\Preview;
 
 use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\UriInterface;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider;
 use TYPO3\CMS\Backend\Routing\PreviewUriBuilder as BackendPreviewUriBuilder;
 use TYPO3\CMS\Backend\Routing\UriBuilder;
@@ -43,6 +44,7 @@ use TYPO3\CMS\Workspaces\Service\WorkspaceService;
  *
  * @internal
  */
+#[Autoconfigure(public: true)]
 class PreviewUriBuilder
 {
     /**
diff --git a/typo3/sysext/workspaces/Classes/Service/GridDataService.php b/typo3/sysext/workspaces/Classes/Service/GridDataService.php
index 3684c27fc0c5..d7d8b27798fb 100644
--- a/typo3/sysext/workspaces/Classes/Service/GridDataService.php
+++ b/typo3/sysext/workspaces/Classes/Service/GridDataService.php
@@ -21,6 +21,7 @@ use Psr\EventDispatcher\EventDispatcherInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerAwareTrait;
+use Symfony\Component\DependencyInjection\Attribute\Autoconfigure;
 use TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider;
 use TYPO3\CMS\Backend\Module\ModuleProvider;
 use TYPO3\CMS\Backend\Utility\BackendUtility;
@@ -44,6 +45,7 @@ use TYPO3\CMS\Workspaces\Service\Dependency\CollectionService;
 /**
  * @internal
  */
+#[Autoconfigure(public: true)]
 class GridDataService implements LoggerAwareInterface
 {
     use LoggerAwareTrait;
diff --git a/typo3/sysext/workspaces/Configuration/Services.yaml b/typo3/sysext/workspaces/Configuration/Services.yaml
index 701b188a7849..b57309b0ac53 100644
--- a/typo3/sysext/workspaces/Configuration/Services.yaml
+++ b/typo3/sysext/workspaces/Configuration/Services.yaml
@@ -12,24 +12,6 @@ services:
     factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
     arguments: ['workspaces_cache']
 
-  TYPO3\CMS\Workspaces\Controller\Remote\RemoteServer:
-    public: true
-
-  TYPO3\CMS\Workspaces\Notification\StageChangeNotification:
-    public: true
-
-  TYPO3\CMS\Workspaces\Preview\PreviewUriBuilder:
-    public: true
-
-  TYPO3\CMS\Workspaces\Service\GridDataService:
-    public: true
-
   TYPO3\CMS\Workspaces\Service\WorkspaceService:
     public: true
     shared: true
-
-  TYPO3\CMS\Workspaces\Controller\Remote\ActionHandler:
-    public: true
-
-  TYPO3\CMS\Workspaces\Hook\DataHandlerHook:
-    public: true
-- 
GitLab