PHPackages                             jaem3l/template-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. jaem3l/template-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

jaem3l/template-bundle
======================

Provides an easy way to use twig templates in your controller.

v1.1.0(8y ago)511MITPHPPHP ^7.1

Since Dec 22Pushed 7y ago3 watchersCompare

[ Source](https://github.com/jaem3l/TemplateBundle)[ Packagist](https://packagist.org/packages/jaem3l/template-bundle)[ RSS](/packages/jaem3l-template-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

jaem3l TemplateBundle for Symfony 4
===================================

[](#jaem3l-templatebundle-for-symfony-4)

[![SensioLabsInsight](https://camo.githubusercontent.com/49bddf541c0aaa06f6917e02555f67fd0c5357d412e0f3e8ce63b9b0fba37c06/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37376261666331322d343138662d343134382d386239342d3132393630343735653666352f6d696e692e706e67)](https://insight.sensiolabs.com/projects/77bafc12-418f-4148-8b94-12960475e6f5)[![Build Status](https://camo.githubusercontent.com/f95f39cf65ed901b70bd5833fdb36be74ff7656e34ac95a1abc45d9261a12525/68747470733a2f2f7472617669732d63692e6f72672f6a61656d336c2f54656d706c61746542756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jaem3l/TemplateBundle)[![Maintainability](https://camo.githubusercontent.com/9327520221cd0f69053621b22e1629a2fdc6fdbf2d9d186d37228937a9bc6090/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64356632313863393734356130313734313762352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/jaem3l/TemplateBundle/maintainability)[![Test Coverage](https://camo.githubusercontent.com/103fbc37494aa0a2f5f0d39a63e30491393ff61114ed77cfa741da45e73905c0/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64356632313863393734356130313734313762352f746573745f636f766572616765)](https://codeclimate.com/github/jaem3l/TemplateBundle/test_coverage)

This bundle provides a single `@Template` annotation that can be used in favor of SensioFrameworkExtraBundle's annotation with the same name.

How it works
------------

[](#how-it-works)

You can see the DummyController inside tests/Annotation/TemplateTest.php as a reference. Twig is fully supported, which should make writing your templates easier.

Requirements
------------

[](#requirements)

- PHP 7.1
- SensioFrameworkExtraBundle 5.1
- Twig 2.4

Installation
------------

[](#installation)

The bundle can be installed via Composer:

```
composer require jaem3l/template-bundle

```

When using this bundle inside a Symfony 4 application bootstrapped with Flex, make sure you have installed the twig-bundle and set it up with its recipe, e.g. by using `composer req twig`.

Usage examples for Route-annotation
-----------------------------------

[](#usage-examples-for-route-annotation)

```
