- Issue created by @berdir
- 🇨🇭Switzerland berdir Switzerland
Merged, decided to stick to this custom hook syntax, looks like #Hook doesn't support multiple hooks per module, and this is more resilient if the method is moved around.
- 🇬🇷Greece vensires
Thank you @berdir for your work!
Just noting down for anyone worried like me; the way the code is implemented makes the change work flawlessly in Drupal 10 too. It's not only for 11.1+.
- 🇨🇦Canada joelpittet Vancouver
Thanks @vensires re #9, I came here for that. And thanks @berdir for diving into the deep-end on this problem.
- 🇨🇭Switzerland berdir Switzerland
Yes, that was an important reason I went with this implementation. it works on any core version, a single update function and done, without dependency on a certain core version, would be impossible to manage. It also doesn't require updates when you convert your code from legacy hooks to new, ore refactor and move things around.
With one important limitation: The new #Hook system kind of allows multiple #Hook implementations, so you could have multiple crons. That does not work with ModuleHandler.:invoke() and therefore also not with the implementation done here. So stick to one cron #Hook or register them explicitly as separate jobs.
Maybe that will be expanded at some point, but I'd still rather do 📌 Support CronSubscribers Active .
Automatically closed - issue fixed for 2 weeks with no activity.