(REF) CiviEventDispatcher - Move service-listener stub to standalone class
authorTim Otten <totten@civicrm.org>
Tue, 4 May 2021 20:31:51 +0000 (13:31 -0700)
committerTim Otten <totten@civicrm.org>
Wed, 5 May 2021 01:24:48 +0000 (18:24 -0700)
commitfc9b680f4d7d7359b7c7b9ca1aeafdaec08be1d9
treeaf58413da537bc23997b291ce6285ed0ff792dce
parentfb159841848dd4a4e996433217fde75e0eb22a78
(REF) CiviEventDispatcher - Move service-listener stub to standalone class

This change makes it easier for reflective tools (e.g.  `cv
debug:event-dispatcher`) to recognize service-based listeners.

Before: `addListenerServce()` creates a stub for the target service+method.
The stub is an anonymous `function`.

After: `addListenerService()` creates a staub for the target service+method.
The stub is based on invokable class.
Civi/Core/CiviEventDispatcher.php
Civi/Core/Event/ServiceListener.php [new file with mode: 0644]
tests/phpunit/Civi/Core/Event/ServiceListenerTest.php [new file with mode: 0644]