[FEATURE] Introduce PSR-14-based EventDispatcher as alternative for hooks
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Configuration / Services.yaml
index 74016a6..3ab5532 100644 (file)
@@ -14,6 +14,13 @@ services:
     arguments:
       $configPath: "%env(TYPO3:configPath)%/sites"
 
+  TYPO3\CMS\Core\EventDispatcher\EventDispatcher:
+    arguments:
+      $listenerProvider: '@TYPO3\CMS\Core\EventDispatcher\ListenerProvider'
+
+  TYPO3\CMS\Core\EventDispatcher\ListenerProvider:
+    public: true
+
   TYPO3\CMS\Core\Package\PackageManager:
     autoconfigure: false
 
@@ -28,3 +35,10 @@ services:
 
   TYPO3\CMS\Core\Database\Schema\SqlReader:
     public: true
+
+  # EventListeners
+  TYPO3\CMS\Core\Compatibility\Slot\PostInitializeMailer:
+    tags:
+      - { name: event.listener,
+          identifier: 'legacy-slot',
+          event: TYPO3\CMS\Core\Mail\Event\AfterMailerInitializationEvent }