- πΉπThailand AlfTheCat
Patch from #43 applies but it seems only to work for node flags. I'm trying to use a token in a flag link on a custom ECK entity and it's not working.
- First commit to issue fork.
- π¬π·Greece vensires
Created MR!72 based on #44 π Re-implement hook_tokens() Needs work without any other change. Useful for the automated testing overview.
- π¬π·Greece vensires
I am almost totally sure I didn't do the rebase correctly. Will retry later.
- π¬π·Greece vensires
Seems hook_tokens() was completely removed by commit 40257ad528474fa355cc91005f6fafd31a5435d7 in order to fix π All coding standard fixes Active .
I will add it back again but we will have to test whether in latest 8.x.4.x versions the tokens have been address in another more dynamic way. - π¬π·Greece vensires
I have fixed the MR and reimplemented the changes manually to be as sure as I can that I got it all correctly. Please validate and try thoroughly!
I also take the opportunity and remove the "Needs tests" tag since there are various comments that tests are fixed etc previously in this issue. The current tests have some @todo comment which someone might like to consider and maybe add the "Needs tests" tag back again.
- First commit to issue fork.
- π¬π·Greece vensires
I fixed the PHPCS issues. There are still some PHPSTAN issues but I'm not sure they are related to this issue's code.
I also upload the latest patch based on the MR. - π¨πSwitzerland berdir Switzerland
drupal core is about to deprecate hook_hook_info() (the issue is RTBC) and the tokens.inc file: https://www.drupal.org/node/3489765 β
For now implementations, as a minimal fix, move the hooks into the .module file or already use the new OOP hooks linked there with #LegacyHook files in .module.
- π¬π·Greece vensires
Thank you @berdir for the update. I wasn't aware of the deprecation change. In my latest commit I transferred the hook implementations to the main module file as a first step short-term fix.
Next thing to do is to follow the guidelines and add the [#LegacyHook] attribute. If anyone else tries to address it, this article by dev.to might be helpful.
- π¬π·Greece vensires
Also uploading the latest diff from the MR as patch.