https://github.com/idmarinas/tracy-twig-bar
A Tracy panel for Twig Template Engine
https://github.com/idmarinas/tracy-twig-bar
debugger php php-library php7 tracy tracy-debugger-panel tracy-panel twig twig-engine
Last synced: 9 months ago
JSON representation
A Tracy panel for Twig Template Engine
- Host: GitHub
- URL: https://github.com/idmarinas/tracy-twig-bar
- Owner: idmarinas
- License: other
- Created: 2020-09-10T15:30:57.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-08-04T14:44:59.000Z (10 months ago)
- Last Synced: 2025-08-04T18:10:42.086Z (10 months ago)
- Topics: debugger, php, php-library, php7, tracy, tracy-debugger-panel, tracy-panel, twig, twig-engine
- Language: PHP
- Homepage:
- Size: 60.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# IDMarinas Twig Tracy Bar


> Add Twig template info in the **Tracy** debugger bar.
[][test-suit]
[](https://sonarcloud.io/summary/new_code?id=idmarinas_tracy-twig-bar)
[][sonarcloud]
[][sonarcloud]



#### Code analysis
[][sonarcloud]
[][sonarcloud]
[][sonarcloud]
[][sonarcloud]
[][sonarcloud]
[][sonarcloud]
[][sonarcloud]
> ## 🖖 Support
>
> 🩵 If you like this project, give it a 🌟 and share it with your friends!
>
> [](https://www.paypal.me/idmarinas)
> [](https://liberapay.com/IDMarinas/donate)
> [](https://github.com/sponsors/idmarinas)


## Installation ##
### Composer ###
```bash
composer require --dev idmarinas/tracy-twig-bar
```
## Usage ##
Somewhere, when your application starts and you initialize Twig engine
```php
use Idmarinas\TracyPanel\TwigBar;
use Idmarinas\TracyPanel\Twig\TracyExtension;
use Twig\Environment;
use Twig\Extension\ProfilerExtension;
use Twig\Profiler\Profile;
// ...
$profile = new Profile();
$env = new Environment($loader, $options);
$env->addExtension(new ProfilerExtension($profile));
/**
* Optional Twig Extension.
*
* Can use `dump`, `dumpe` and `bdump` functions of Tracy
*/
$env->addExtension(new TracyExtension()); //-- Optional
TwigBar::init($profile);
```
## 🖱️ Tech used in code

[](https://www.php.net)
## 🛠️ Tools used to create this project

[](https://github.com/features/actions)
[](https://www.docker.com)
[](https://getcomposer.org)
## 💬 Social
[](https://x.com/idmarinas)
[](https://discord.gg/FXEZqpF)
[//]: # (@formatter:off)
[sonarcloud]: https://sonarcloud.io/dashboard?id=idmarinas_tracy-twig-bar
[test-suit]: https://github.com/idmarinas/tracy-twig-bar/actions/workflows/php.yml