Review main Merged

80386[FEATURE] Improve event listener registration

Oli Bartsch CR +2 V +2 Normal +57 −33 updated 08/04/23, 16:18

Commit message

It's now possible to register event listeners with
the `AsEventListener` PHP Attribute - introduced
with #101544 - on a method level.

Additionally, the listener identifier is now exposed
into the ListenerProvider, making this information
available, e.g. in the configuration module.

Registration of login failed related listeners is
adapted accordingly, which also fixes a duplicated
registration due to a missing `event` declaration.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benjamin Franzke +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 9

Review log 1215

  1. Oli Bartsch uploaded patch set 1 08/04/23, 09:52

  2. core-ci voted on patch set 1 V -1 08/04/23, 09:59 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45042

  3. Sascha Nowak commented on patch set 1 CR -1 08/04/23, 10:15

    Thanks for making my change even better. I added some comments to your PR.

    Services.php:25

    The variable $reflector is unused.

    Feature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:21

    Could you mention, that the serviceName is used as identifier if not set, as this could be relevant for execution sequence
  4. Oli Bartsch uploaded patch set 2 CR -1 V -1 08/04/23, 11:24

  5. Oli Bartsch commented on patch set 2 08/04/23, 11:25

    Services.php:25 Reply

    This is by intention. Otherwise method target does not work.

    Feature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:21 Reply

    This is the behaviour for the tags and not dedicated to the new PHP Attribute. However, I added the information here anyways.
  6. Sascha Nowak voted on patch set 2 V +1 08/04/23, 11:31

  7. core-ci voted on patch set 2 V +1 08/04/23, 11:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45049

  8. Andreas Kienast voted on patch set 2 CR +1 08/04/23, 12:26

  9. Andreas Kienast voted on patch set 2 V +1 08/04/23, 13:36

  10. Benjamin Franzke uploaded patch set 3 CR +1 V +1 08/04/23, 13:42

  11. core-ci voted on patch set 3 V +1 08/04/23, 13:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/45072

  12. Andreas Kienast voted on patch set 3 V +1 CR +1 08/04/23, 14:16

  13. Oli Bartsch voted on patch set 3 V +2 CR +2 08/04/23, 14:18

  14. Oli Bartsch merged patch set 4 08/04/23, 14:18

  15. Benni Mack voted on patch set 4 CR +1 08/04/23, 16:18