- Merge request !3Issue #3227446: Remove message_token_info and let Token module define all tokens β (Open) created by mglaman
- First commit to issue fork.
- last update
5 months ago 30 pass, 2 fail - π³π±Netherlands eelkeblok Netherlands π³π±
I see that the tests change the used tokens from [message:author:name] to [message:uid:entity:name] and that the hook_token is completely removed. This looks like a BC-breaking change. I'm not sure, but maybe we can somehow keep them functional while also giving a deprecation warning (I think this may be possible by implementing the token in hook_token but not actually defining them, i.e. still leaving out hook_token_info.
- π³π±Netherlands eelkeblok Netherlands π³π±
Actually, why do we want to leave this to token module? It is not a dependency, and I am unsure whether we should want it to be. I am currently on a quest to get the variant values of messages to be available as tokens and thought this might do it, but no luck.
- π³π±Netherlands eelkeblok Netherlands π³π±
I wasn't entirely sure why this is happening. In case you are curious as well, this is where token module is deciding not to do any base field tokens when a module defines its own tokens: https://git.drupalcode.org/project/token/-/blob/8.x-1.x/token.tokens.inc... (Still not 100% in the clear why it does that, but there's probably a good reason).
In the spirit of DRY, I guess a lot is to be said for actually depending on token module.
- We'll need a dependency on token module in info.yml (and concencus this is what we want to do..?)
- Wel'll need an update hook to enable token module if it is not enabled
- We'll need to check which of our own tokens can be removed completely because they are now defined by token module
- We'll need to check which of our own tokens have equivalents in the default token implementation and deprecate them, presumably by issuing a deprecation warning when they are used