diff --git a/src/TwigRenderer.php b/src/TwigRenderer.php index 43eefae..6c0efff 100644 --- a/src/TwigRenderer.php +++ b/src/TwigRenderer.php @@ -34,7 +34,14 @@ function __construct(array $config) { if (isset($this->config['src']['namespaces'])) { foreach ($this->config['src']['namespaces'] as $namespace) { foreach ($namespace['paths'] as $path) { - $this->loader->addPath($path, $namespace['id']); + // The twigRenderer tries to access paths which + // might be not present anymore. In that case we + // have to catch this + try { + $this->loader->addPath($path, $namespace['id']); + } catch (Throwable $e) { + // ignore + } } } }