- Issue created by @berdir
To remove a hook with the RemoveHook attribute, you must specify a class and method.
This forces you to hardcode things that we consider internals. We are moving around hook methods between classes in core in minor versions, so we clearly consider this very much an internal thing.
Hook implementations are not covered by BC, but at the same time, we also offer an explicit API to do removals and there are valid cases for this even in core.
Add a module argument to RemoveHook, require either module or class + method. There are edge cases where you might want to remove just one out of multiple hook implementations, but that's going to be extremely rare.
The current approach also makes BC hard if you want to remove a hook from another module that hasn't yet converted to OOP but eventually will.
Active
11.0 🔥
extension system