Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Conversation

jakeBarwell
Copy link

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.

@geerteltink
Copy link
Member

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');

@jakeBarwell
Copy link
Author

Fair point, I did forget to check the interface and that method does work so it's not critical to add this 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants