I have "views/content/index.twig" with content {% extends "_base.twig" %} and "views/_base.twig" with some another content.
$di->setShared('view', function ()
{
$view = new \Phalcon\Mvc\View();
$view->setViewsDir(VIEWS_DIR);
$view->registerEngines(array(
'.twig' => function($view, $di)
{
$voltEngine = new Phalcon\Mvc\View\Engine\Volt($view, $di);
$voltEngine->setOptions(array(
'compiledPath' => function ($templatePath)
{
// ----------------------- breakpoint here
$result = str_replace(VIEWS_DIR, VIEWS_CACHE_DIR, $templatePath) . '.txt';
$resultParentDir = dirname($result);
if (!is_dir($resultParentDir))
{
mkdir($resultParentDir, 0755, true);
}
return $result;
}
));
return $voltEngine;
}
));
return $view;
});
if I use Phalcon 2.0.7 - Windows x86 for PHP 5.6.0 (vc11) - all works as expected. But if I use Phalcon 2.1.0.beta1 - Windows x86 for PHP 5.6.0 (vc11) - then receive error "Template file Array_base.twig does not exist".
At breakpoint I can see $templatePath = Z:/home/myproject/views/content/index.twig first time (as expected), and Array_base.twig second time (as not expected).