If I configure Twig's cache to myapp/storage/cache
and manually set the correct permissions it works, but configuring it to sys_get_temp_dir()
(which returns /tmp
) doesn't seem to work. File structure in /tmp
remains the same, altough no error is triggered.
My block of code is like this:
// [...]
$app->register(new \Silex\Provider\TwigServiceProvider(), array(
'twig.path' => __DIR__ . '/templates',
'twig.options' => array(
'cache' => sys_get_temp_dir(), // If changed to myapp/storage/cache, it works.
),
));