stable

Clone or download

Read-only

chore: Convert some plugins to attribute based event listening

List of impacted plugins: * api explorer * captcha * mfa * pluginsadministration * prometheus metrics * securitytxt * userlog I took a limited list of small plugins in order to ease the review. Implementation note ------------------- One event needs a special attention: GetConfigKeys when it is based on parent interface ConfigClassProvider in a plugin that does not implement PluginWithConfigKeys. Ex for pluginsadministration: ``` $this->addHook(GetConfigKeys::NAME); ... public function getConfigKeys(ConfigClassProvider $event): void ``` Will be transformed to: ``` #[\Tuleap\Plugin\ListeningToEventClass] public function getConfigKeys(ConfigClassProvider $event): void ``` But it won't work. I had to manually removed the attribute and implements PluginWithConfigKeys. Part of request #31113: Simplify hook listening for plugins Change-Id: Icda02cae322452676eeceec896c1bfd893866949

Modified Files

Name
M plugins/api_explorer/include/api_explorerPlugin.php +2 −7 Go to diff View file
M plugins/captcha/include/captchaPlugin.php +7 −8 Go to diff View file
M plugins/mfa/include/mfaPlugin.php +2 −8 Go to diff View file
M plugins/pluginsadministration/include/pluginsadministrationPlugin.php +8 −10 Go to diff View file
M plugins/prometheus_metrics/include/prometheus_metricsPlugin.php +3 −9 Go to diff View file
M plugins/securitytxt/include/securitytxtPlugin.php +1 −7 Go to diff View file
M plugins/userlog/include/userlogPlugin.php +6 −12 Go to diff View file