The new Hooks system in T240307: Hook container with strong types and DI allows you to mark deprecated hooks, eg:
{ "Hooks": { "UserLoginComplete" : { "handler": "*", "deprecated": true }, "UserLoginComplete2" : { "handler": "*" } } }
However, "acknowledging deprecation in this way causes the handler to not be called."
This causes problems for third-party code which doesn't have the resources to immediately patch their code to remove/replace usage of a deprecated hook. As soon as the hook is hard-deprecated in core, their CI breaks and becomes unusable until they replace usage of the deprecated hook, which may require engineering resources they don't immediately have.
There ought to be a way to acknowledge deprecation/suppress deprecation warnings *without* preventing the hook from being called.
You can probably use some version of MediaWikiTextCaseTrait::hideDeprecated / ::filterDeprecated, but the string to use is quite complicated (see HookContainer::callLegacyHook). It would be better if it were a simple boolean added to extension.json like deprecated: true; perhaps acknowledgeDeprecation: true or something like that.