Port the init system event to D8, PR to follow.

Pull request

Comments

Anonymous’s picture

Status: Active » Needs review
Anonymous’s picture

Assigned: » Unassigned
Status: Needs review » Closed (works as designed)

Closing 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 :-)

fago’s picture

Status: Closed (works as designed) » Needs work

Yes, it should be enough to specify the event in the rules.rules_events.yml file since that hook is an event already :-)

Right, that needs to be done though.

Anonymous’s picture

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?

fago’s picture

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.

a.milkovsky’s picture

Assigned: Unassigned » a.milkovsky
a.milkovsky’s picture

Issue summary: View changes
a.milkovsky’s picture

Assigned: a.milkovsky » Unassigned
Status: Needs work » Needs review

Added 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.

a.milkovsky’s picture

Issue summary: View changes
fago’s picture

Status: Needs review » Fixed

Thanks, that works.

  • fago committed 41c54e9 on 8.x-3.x authored by a.milkovsky
    Issue #2539700 by a.milkovsky, stevepurkiss: Port "init" system event to...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.