[TYPO3-core] Signals vs. Hooks
Philipp Gampe
philipp.gampe at typo3.org
Mon Aug 25 18:46:54 CEST 2014
Hi Markus,
Markus Klein wrote:
> The new hook mechanism shall be based on Interfaces and shall allow data
> manipulation (preferably via data objects
Careful with that one. You might get what you ask for ;) We had this before
(interfaces on hooks). This breaks all extensions subscribing to a hook as
soon as you have to modify the list of arguments. Or to state that
otherwise: As soon as you use interfaces on hook data, you must never ever
change the hook again.
This makes refactoring a nightmare. And it is against the design principle
of PHP.
I am really a fan of the simple DTO data structure that is part of the PHP
core: array(). We should make is of this in such situations.
Best regards
--
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – Active contributor TYPO3 CMS
TYPO3 .... inspiring people to share!
More information about the TYPO3-team-core
mailing list