The initializeSystem hook is triggered right after the system initialization
process is finished and before the request processing is started. This also means the request has no contao request scope set and no language redirects have been executed.
Example
// src/EventListener/InitializeSystemListener.php
namespaceApp\EventListener;useContao\CoreBundle\DependencyInjection\Attribute\AsHook;#[AsHook('initializeSystem')]
classInitializeSystemListener{publicfunction__invoke():void{// Do something …
}}