Review main Merged

63099[TASK] Deprecate Extbase's SignalSlot Dispatcher

Benni Mack CR +2 V +2 Normal +72 −5 updated 03/06/20, 10:12

Commit message

Extbase's SignalSlot Dispatcher has had its good run - it served
as a possible successor instead of Hooks but lacked a good standardized
API for stopping propagation, and defining interfaces for slots.

The new PSR-14 based event system has superseded SignalSlot
logic from Extbase. Everybody is encouraged to not use Signal Slot
logic anymore. TYPO3 Core does not use SignalSlots anymore, and the
SignalSlot Dispatcher will be removed in TYPO3 v11.0 - and is therefore
annotated as deprecated.

Several advantages of PSR-14 over Signal Slot logic defined here again:
- PSR-14 has a stoppable interface so event listeners can define that an event should not propagate anymore.
- PSR-14 events are pure and plain PHP classes so it is VERY clear what can be read or modified.
- TYPO3's implementation is fully compatible with other frameworks PSR-14 event-based system, so everything can be developed against the interface, not a concrete implementation (thanks to DI), and TYPO3 can exchange its own implementation against a different one.
- All available listeners are registered during "DI-build-time" and not in ext-localconf.php anymore
which can have an impact on performance.

Please note that using SignalSlot Dispatcher will not trigger a
deprecation warning as it is still used throughout many extensions.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 6