Skip to content

Commit 22eb5cd

Browse files
committed
Use mustache pragma helper by default
1 parent 3f3348f commit 22eb5cd

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

ProcessMaker/Models/MustacheExpressionEvaluator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MustacheExpressionEvaluator implements TemplateExpressionInterface
1515

1616
public function __construct(array $options = [])
1717
{
18-
$this->engine = new Mustache_Engine($options);
18+
$this->engine = app(Mustache_Engine::class, $options);
1919
}
2020

2121
/**

ProcessMaker/Providers/WorkflowServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,13 @@ function (ThrowEventInterface $source, EventDefinitionInterface $sourceEventDefi
201201
/**
202202
* Mustache Engine
203203
*/
204-
$this->app->bind(Mustache_Engine::class, function () {
204+
$this->app->bind(Mustache_Engine::class, function ($app, $params) {
205205
$op = new MustacheOptions;
206206

207207
return new Mustache_Engine([
208208
'helpers' => $op->helpers,
209209
'pragmas' => [Mustache_Engine::PRAGMA_FILTERS],
210+
...($params['options'] ?? []),
210211
]);
211212
});
212213

0 commit comments

Comments
 (0)