src/Helper/SubSystemBoot.php
private function tryDispatch($eventName, MetaModelsBootEvent $event)
    {
        $dispatcher = System::getContainer()->get('event_dispatcher');
        if ($dispatcher->hasListeners($eventName)) {
            // @codingStandardsIgnoreStart
            @trigger_error('Event "' . $eventName . '" has been deprecated - Use registered services.', E_USER_DEPRECATED);
            // @codingStandardsIgnoreEnd
            $dispatcher->dispatch($eventName, $event);
        }
    }
private function tryDispatch($eventName, MetaModelsBootEvent $event)
    {
        $dispatcher = System::getContainer()->get('event_dispatcher');
        if ($dispatcher->hasListeners($eventName)) {
            // @codingStandardsIgnoreStart
            @trigger_error('Event "' . $eventName . '" has been deprecated - Use registered services.', E_USER_DEPRECATED);
            // @codingStandardsIgnoreEnd
            $dispatcher->dispatch($eventName, $event);
        }
    }
Test if the event must get dispatched, if so, trigger deprecation and dispatch then.

@param string              $eventName The event name.
@param MetaModelsBootEvent $event     The event payload.

@return void