public function onKernelRequest(GetResponseEvent $event): void
    {
        foreach ($this->extensions as $extension) {
            if (!class_exists($extension) || !is_a($extension, ExtensionInterface::class, true)) {
                continue;
            }

            if ($this->twig->hasExtension($extension)) {
                continue;
            }

            $this->twig->addExtension(new $extension());
        }
    }