What causes the "Twig_Environment not found" error in this Codeigniter application?

  codeigniter, codeigniter-3, php, symfony, twig

I am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Bootstrap 4. I have decided to add themes to it. The application is not HMVC, only MVC.

I thought it was a good idea to use the Twig template engine to the theme(s). For this purpose, I use CodeIgniter Simple and Secure Twig.

I added the Simple and Secure Twig library:applicationlibrariesTwig.php.

In the third_party directory I have added Twig (version 1.x) itself.

In applicationconfigautoload.php, I have loaded Twig:

$autoload['libraries'] = array('database', 'form_validation', 'session', 'user_agent', 'twig');

The problem

In the browser, I get the error:

Message: Class 'Twig_Environment' not found. 
Filename: pathtorootapplicationlibrariesTwig.php

What am I doing wrong?

Source: Symfony Questions