EventSubscriber order of operation

Created on 17 January 2014, about 11 years ago
Updated 26 June 2023, over 1 year ago

I cannot tell if this is a documentation issue or a code issue, but in testing #2098119: Replace config context system with baked-in locale support and single-event based overrides β†’ I ran into a race condition between two EventSubscribers.

One is a KernelEvent subscriber, the second a ConfigOverrideEvent subscriber.

The second is dependent on the first.

These values "work" for the two subscribers.

// DomainSubscriber
    $events[KernelEvents::REQUEST][] = array('onKernelRequestDomain', 300);
// DomainConfigSubscriber
    $events['config.module.overrides'][] = array('onDomainModuleOverride', 400);

These values do not:

// DomainSubscriber
    $events[KernelEvents::REQUEST][] = array('onKernelRequestDomain', 100);
// DomainConfigSubscriber
    $events['config.module.overrides'][] = array('onDomainModuleOverride', 400);

I have working code and SimpleTests for this in https://github.com/agentrickard/domain

πŸ“Œ Task
Status

Closed: outdated

Version

9.5

Component
ConfigurationΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States agentrickard Georgia (US)

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024