Anonymous (not verified)CreditAttribution: Anonymous as a volunteer commented
I understood that was covered by 'kernel.request' being declared in the rules.rules_events.yml file - what else needs to be done? link 'rules_init' to it?
I understood it's not in rules.rules_events.yml, but it turns out it is - so that's fine :)
So only thing missing then is test-coverage in EventIntegrationTest.
Notes:
When I trigger KernelEvents::REQUEST, Drupal tries to initialize one more time.
I had to remove all the listeners except Rules before triggering an event to prevent unnecessary calls from different subscribers.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedFirst go, see https://github.com/fago/rules/pull/210
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedClosing as further code not required:
bojanz commented:
hook_init() doesn't actually exist anymore: https://www.drupal.org/node/2013014
klausi commented:
Yes, it should be enough to specify the event in the rules.rules_events.yml file since that hook is an event already :-)
Comment #3
fagoRight, that needs to be done though.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous as a volunteer commentedI understood that was covered by 'kernel.request' being declared in the rules.rules_events.yml file - what else needs to be done? link 'rules_init' to it?
Comment #5
fagoI understood it's not in rules.rules_events.yml, but it turns out it is - so that's fine :)
So only thing missing then is test-coverage in EventIntegrationTest.
Comment #6
a.milkovskyI will help here https://github.com/fago/rules/pull/356
Comment #7
a.milkovskyComment #8
a.milkovskyAdded the test.
Notes:
When I trigger KernelEvents::REQUEST, Drupal tries to initialize one more time.
I had to remove all the listeners except Rules before triggering an event to prevent unnecessary calls from different subscribers.
P.S. Link to PR is in the task description.
Comment #9
a.milkovskyComment #10
fagoThanks, that works.