stable

Clone or download

Read-only

chore: Convert DocmanPlugin to attribute based event listening

The choice was to let Rector do its job and touch as little as possible to docmanPlugin (to avoid manual mistakes). So no clean-up of comments or parameters, unless it prevented commit (phpcs) or caught by psalm. Improvement of Rector: deal with getHooksAndCallback in addition to constructor addHook. There is one addHook remaining for services allowed for project because it should probably be handled differently. Part of: request #31113 Simplify hook listening for plugins Change-Id: Ibebf85b6ac70cbdf00c82cad5b1bd5c6af51e924

Modified Files

Name
M plugins/docman/include/docmanPlugin.php +96 −146 Go to diff View file
M tests/unit/TuleapDev/Rector/_fixtures/plugin-with-add-hook-calls.php.inc +23 −0 Go to diff View file
M tools/utils/Rector/ConvertAddHookToAttributesRule.php +13 −6 Go to diff View file