Installation¶
You have multiple ways to install Twig.
Installing the Twig PHP package¶
Installing via Composer (recommended)¶
Install Composer and run the following command to get the latest version:
composer require twig/twig:~2.0
Installing from the tarball release¶
- Download the most recent tarball from the download page
- Verify the integrity of the tarball http://fabien.potencier.org/article/73/signing-project-releases
- Unpack the tarball
- Move the files somewhere in your project
Installing the development version¶
git clone git://github.com/twigphp/Twig.git