Class 'Twig\Cache\NullCache' not found on updating to 3.2
Hi!
Seem to have hit a roadblock updating Vanilla from 3.1 to 3.2. Upon following the upgrade directions and loading utility/update:
Fatal Error in Twig\Environment.setCache();
Class 'Twig\Cache\NullCache' not found
The error occurred on or near: /.../public_html/vendor/twig/twig/src/Environment.php
266: $this->originalCache = $cache;
267: $this->cache = new FilesystemCache($cache);
268: } elseif (false === $cache) {
269: $this->originalCache = $cache;
270: $this->cache = new NullCache();
271: } elseif ($cache instanceof CacheInterface) {
272: $this->originalCache = $this->cache = $cache;
273: } else {
274: throw new \LogicException(sprintf('Cache can only be a string, false, or a \Twig\Cache\CacheInterface implementation.'));
Any ideas about ways to proceed? Rolled back for now.
Cheers,
Michael
1

Comments
Hello, did you managed to solved your issue?
I had a similar, one which I reported on these threads
https://open.vanillaforums.com/discussion/37561/upgrading-from-3-1-to-3-2-fatal-error-in-twig-loader-filesystemloader-findtemplate
https://open.vanillaforums.com/discussion/37736/adding-a-custom-path-to-twig
Which happened because my Twig files were outside my site installation directory (I serve by symlinking the vanilla files so to reduce the installaion size as I have various sites, all of them symlinked to the vanilla files, with exception of
cache/,confanduploadswhich are not symlinked.)edit: today I upgraded to 3.3 with the same error as the first post, and fixed by "patching" with the solution on the second post above.
No, I never solved it, sadly - I'm still stuck on 3.1.
That's great that you got it though! I'll see if it helps me next time I have some time to dig away at it.
This was an annoying case of PEBKAC - I'd added "cache" to my gitignore file rather than "/cache", and being on a case-insensitive filesystem, the Cache folder from twit wasn't added to my git repository used to distribute updates out to my servers. Boo!
Happy to hear your resolved your issue!