Class 'Twig_Loader_Filesystem' not found
plash29 opened this issue · 6 comments
| Yii vesion 2 |
| PHP version 5.6 |
| Operating system | window 7
Thanks for posting in our issue tracker.
In order to properly assist you, we need additional information:
- When does the issue occur?
- What do you see?
- What was the expected result?
- Can you supply us with a stacktrace? (optional)
- Do you have exact code to reproduce it? Maybe a PHPUnit tests that fails? (optional)
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
When does the issue occur?
I have installed https://github.com/bubasuma/yii2-simplechat extension. After extending their classes i got this issue. I am using twig as the template engine.
What do you see?
PHP Fatal Error – yii\base\ErrorException
Class 'Twig_Loader_Filesystem' not found
What was the expected result?
I should have got the chatting as shown in the extension docs.
Please provide more info. We won't be able to reproduce it and we aren't going to dig into third party extension to find out details...
I use this command to install the twig.
"require": {
"yiisoft/yii2-twig": "> 2.0.4",
"bower-asset/twig.js" : "0.8.4@stable"
},
After run the composer :
I write the code in config/web.php
'view' => [
'renderers' => [
'twig' => [
'class' => 'yii\twig\ViewRenderer',
// set cachePath to false in order to disable template caching
'cachePath' => false, //'@runtime/Twig/cache',
// Array of twig options:
'options' => [
'auto_reload' => true,
],
// add Yii helpers or widgets here
'globals' => [
'html' => '\yii\helpers\Html',
]
]
]
],
Try Twig 2.2.0 and don't specify bower-asset/twig.js