Closed jakeBarwell closed 6 years ago
I'm not a fan of adding extra methods which are not described in the interface. Especially when something is already possible (I haven't tested it though):
$twigEnvironment = $container->get(Twig_Environment::class);
/** @var FilesystemLoader $loader */
$loader = $twigEnvironment->getLoader();
$loader->prependPath('test');
Fair point, I did forget to check the interface and that method does work so it's not critical to add this :+1:
The TwigRenderer exposes the addPath method of the TwigFilesytem but users may need to addPaths with higher priority than those already loaded by using prependPath. This pull requests simply exposes that function replicating the addPath wrapper.