PHPackages                             djboris88/twig-commented-include - 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. djboris88/twig-commented-include

ActiveLibrary[Templating &amp; Views](/categories/templating)

djboris88/twig-commented-include
================================

Twig extension which outputs HTML comments before and after the `include` tag

2.0.0(2y ago)298.6k—6.3%5[1 PRs](https://github.com/djboris88/twig-commented-include/pulls)3GPL-3.0PHPPHP &gt;=5.6

Since Dec 3Pushed 2y agoCompare

[ Source](https://github.com/djboris88/twig-commented-include)[ Packagist](https://packagist.org/packages/djboris88/twig-commented-include)[ Docs](https://github.com/djboris88/twig-include-comments)[ RSS](/packages/djboris88-twig-commented-include/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (3)

Commented Include for Twig
==========================

[](#commented-include-for-twig)

This is a simple Twig Extension which helps debugging and navigating through many Twig partials in your project. It outputs a HTML comments before and after each `include` statement while rendering the template. Comments look like this:

```

...

```

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

[](#installation)

To install the latest stable version of this component, open a console and execute the following command:

```
composer require djboris88/twig-commented-include
```

Usage
-----

[](#usage)

The first step is to register the extension into the twig environment

```
/** @var $twig Twig_Environment */
$twig->addExtension(new Djboris88\Twig\Extension\CommentedIncludeExtension());
```

Once registered, it will automatically add the HTML comments before and after every `include` tag in the Twig files.

Symfony Bundle
--------------

[](#symfony-bundle)

If you want to use this extension in your Symfony application, you can enable the Symfony Bundle included in this package.

The bundle will register the twig extension automatically.

### Symfony 2/3

[](#symfony-23)

```
// app/AppKernel.php
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
    $bundles[] = new Djboris88\Twig\Extension\CommentedIncludeTwigExtensionBundle();
}
```

### Symfony 4

[](#symfony-4)

```
// config/bundles.php
//...
return [
    //...
    Djboris88\Twig\Extension\CommentedIncludeTwigExtensionBundle::class => ['dev' => true]
];
```

License
-------

[](#license)

This component is under the GPL 3.0 license. See the complete license in the [LICENSE](LICENSE) file.

Reporting an issue or a feature request
---------------------------------------

[](#reporting-an-issue-or-a-feature-request)

Issues and feature requests are tracked in the [Github issue tracker](https://github.com/djboris88/twig-include-comments/issues).

Author Information
------------------

[](#author-information)

Developed with ♥ by Boris Đemrovski.

If you find this component useful, please add a ★ in the [GitHub repository page](https://github.com/djboris88/twig-include-comments) and/or the [Packagist package page](https://packagist.org/packages/djboris88/twig-include-comments).

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~623 days

Total

4

Last Release

853d ago

Major Versions

1.2.0 → 2.0.02024-01-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/98bd77a38d1f4c7bc70ec70270636ad2860130b1c1888e9a46c36c7a0b11a754?d=identicon)[djboris88](/maintainers/djboris88)

---

Top Contributors

[![djboris88](https://avatars.githubusercontent.com/u/9459880?v=4)](https://github.com/djboris88 "djboris88 (6 commits)")[![n3storm](https://avatars.githubusercontent.com/u/220748?v=4)](https://github.com/n3storm "n3storm (5 commits)")

---

Tags

twigdebughtmlcomments

### Embed Badge

![Health badge](/badges/djboris88-twig-commented-include/health.svg)

```
[![Health](https://phpackages.com/badges/djboris88-twig-commented-include/health.svg)](https://phpackages.com/packages/djboris88-twig-commented-include)
```

###  Alternatives

[twig/string-extra

A Twig extension for Symfony String

22046.0M133](/packages/twig-string-extra)[twig/markdown-extra

A Twig extension for Markdown

12114.3M83](/packages/twig-markdown-extra)[twig/html-extra

A Twig extension for HTML

787.6M41](/packages/twig-html-extra)[twig/cache-extra

A Twig extension for Symfony Cache

392.1M20](/packages/twig-cache-extra)[spress/spress

Static site generator with blogs support

37436.2k](/packages/spress-spress)[nochso/html-compress-twig

Twig extension for compressing HTML and inline CSS/Javascript

84468.6k8](/packages/nochso-html-compress-twig)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
