Skip to content

feat: pass additional configuration into twig-php engine #1118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/engine-twig-php/lib/engine_twig_php.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const engine_twig_php = {
process.exit(1);
}

const { namespaces, alterTwigEnv, relativeFrom } = config.engines.twig;
const { namespaces, alterTwigEnv, relativeFrom, ...rest } = config.engines.twig;

// Schema on config object being passed in:
// https://github.com/basaltinc/twig-renderer/blob/master/config.schema.json
Expand All @@ -55,6 +55,7 @@ const engine_twig_php = {
},
relativeFrom,
alterTwigEnv,
...rest,
});

// Preserve the namespaces (after recursively adding nested folders) from the config so we can use them later to evaluate partials.
Expand Down