Tell composer to add the bundle to your composer.json
by running the command:
$ php composer.phar require noiselabs/smarty-bundle ~2.0
Composer will install the bundle to your project’s vendor/noiselabs
directory.
Enable the bundle in the kernel:
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new NoiseLabs\Bundle\SmartyBundle\SmartyBundle(),
);
}
# app/config/config.yml
# ...
framework:
templating:
engines: ['twig', 'php', 'smarty']
Warning
You need to enable the php
engine as well. Otherwise some services will not work as expected. See `https://github.com/symfony/symfony/issues/14719`_