•  
      request #31547 Simplify hook listening for plugins Part 2
    Infos
    #31547
    Nicolas Terray (nterray)
    2023-12-05 11:45
    2023-04-05 10:36
    33134
    Details
    Simplify hook listening for plugins Part 2

    As of today, for plugins, listening to hooks is tedious, there is a lot of copy/paste and things are scattered at different places:

    • Usage of hooks must be declared in getHooksAndCallbacks
    • It's not easy to find the hook that correspond to a callback
    • There is a lot of repetition of the event: at hook declaration (getHooksAndCallbacks), at the name of the callback, at the first parameter name.

    Using attributes, we can greatly simplify that.

    Empty
    Empty
    Empty
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Empty
    Reopen
    2023-03-30
    Attachments
    Empty
    References
    Referencing request #31547

    Git commit

    tuleap/tuleap/stable

    Convert taskboard plugin to attribute based event listening 0aa0f9e05d
    Convert testmanagement plugin to attribute based event listening 95e8262019
    Chore: Convert label to attribute based event listening 803d57656b
    chore: Convert velocity to attribute based event listening e0b422d0b8
    chore: Convert testplan to attribute based event listening 760601fe77
    chore: Convert mytuleap_contact_support to attribute based event listening 78c570f20f
    chore: Convert embed to attribute based event listening c17def84eb
    chore: Convert frs to attribute based event listening 4176ed3683
    chore: Remove constant based events from AD plugin 9cd823e5ef
    chore: Convert gitlab to attribute based event listening 7da459e681
    chore: Convert tuleap_synchro to attribute based event listening 29cac3e471
    chore: Convert ldap to attribute based event listening d6aacaf321
    chore: Convert abstract PluginWithLegacyInternalRouting to attribute based event listening 4615e5f182
    chore: Convert program_management to attribute based event listening af1e8e0f25
    chore: Convert timetracking to attribute based event listening ef407558c0
    chore: Convert tracker_encryption to attribute based event listening 36e696a34e
    chore: Convert jira_import to attribute based event listening 3bad927616
    chore: Remove constant based events from cardwall plugin 43162233a0
    chore: Convert crosstracker to attribute based event listening 9b40790283
    fix: Use event object instead of constant 0edc50f59a
    chore: Convert pullrequest to attribute based event listening c9e5722c19

    Follow-ups