Подключаю автолоадер композера и класс твига:
require_once (ROOT . '/vendor/autoload.php');
Twig_Autoloader::register();
$loader = new Twig_Loader_Filesystem(ROOT . '/views/twig');
$twig = new Twig_Environment($loader);
Проверяю, вываливает:
Fatal error: Uncaught Error: Class 'Twig_Autoloader' not found in /app/index.php on line 15
Error: Class 'Twig_Autoloader' not found in /app/index.php on line 15
composer.json
{
"name": "test/test",
"type": "project",
"license": ,
"authors": ,
"config": {
"vendor-dir": "./app/vendor"
},
"require": {
"twig/twig": "~2.0"
}
}