2017 © Pedro PelĂĄez
 

symfony-bundle templating-extra-bundle

Profiles all the rendered templates (Twig or PHP) during a Symfony2 page rendering

image

mremi/templating-extra-bundle

Profiles all the rendered templates (Twig or PHP) during a Symfony2 page rendering

  • Wednesday, January 28, 2015
  • by mremi
  • Repository
  • 2 Watchers
  • 6 Stars
  • 20,041 Installations
  • PHP
  • 0 Dependents
  • 2 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

MremiTemplatingExtraBundle

SensioLabsInsight, (*1)

Build Status Total Downloads Latest Stable Version Scrutinizer Code Quality Code Coverage, (*2)

This bundle profiles all the rendered templates (Twig or PHP) during a Symfony2 page rendering. This only includes templates which are rendered by render and renderResponse through the templating service (for instance, include and embed Twig tags are not tracked)., (*3)

License

This bundle is available under the MIT license., (*4)

Prerequisites

This version of the bundle requires Symfony 2.1+., (*5)

Basic Docs, (*6)

, (*7)

Installation

Installation is a quick 2 step process:, (*8)

  1. Download MremiTemplatingExtraBundle using composer
  2. Enable the Bundle

Step 1: Download MremiTemplatingExtraBundle using composer

Add MremiTemplatingExtraBundle in your composer.json:, (*9)

{
    "require": {
        "mremi/templating-extra-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:, (*10)

``` bash $ php composer.phar update mremi/templating-extra-bundle, (*11)


Composer will install the bundle to your project's `vendor/mremi` directory. ### Step 2: Enable the bundle Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Mremi\TemplatingExtraBundle\MremiTemplatingExtraBundle(), ); }

, (*12)

Profiler

If your are in debug mode (see your front controller), you can check in the web debug toolbar the rendered templates and some statistics from the current HTTP request: number of templates, consumed memory, request duration..., (*13)

It's very easy to know which templates consume just looking at the colors (red and yellow)., (*14)

Moreover, you can see all parameters passed to each template. This can be useful for the front office development., (*15)

Screenshot, (*16)

If you configured the framework bundle (or xdebug.file_link_format), you can edit templates just by clicking on name., (*17)

, (*18)

Contribution

Any question or feedback? Open an issue and I will try to reply quickly., (*19)

A feature is missing here? Feel free to create a pull request to solve it!, (*20)

I hope this has been useful and has helped you. If so, share it and recommend it! :), (*21)

@mremitsme, (*22)

The Versions

28/01 2015

dev-master

9999999-dev https://github.com/mremi/TemplatingExtraBundle

Profiles all the rendered templates (Twig or PHP) during a Symfony2 page rendering

  Sources   Download

MIT

The Requires

 

by RĂ©mi Marseille

templating symfony2 profiler

12/08 2013

v1.0.0

1.0.0.0 https://github.com/mremi/TemplatingExtraBundle

Profiles all the rendered templates (Twig or PHP) during a Symfony2 page rendering

  Sources   Download

MIT

The Requires

 

by RĂ©mi Marseille

templating profiler