PHPackages                             patrick-maynard/audit-class-generator - 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. patrick-maynard/audit-class-generator

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

patrick-maynard/audit-class-generator
=====================================

A simple tool that allows developers to see which Twig templates are being used to generate a page

v0.10.0(1mo ago)0261[1 issues](https://github.com/patrickmaynard/audit-class-generator/issues)[1 PRs](https://github.com/patrickmaynard/audit-class-generator/pulls)MITPHPPHP &gt;=8.0

Since Jan 21Pushed 1mo agoCompare

[ Source](https://github.com/patrickmaynard/audit-class-generator)[ Packagist](https://packagist.org/packages/patrick-maynard/audit-class-generator)[ Docs](http://home.patrickmaynard.com)[ RSS](/packages/patrick-maynard-audit-class-generator/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (5)Versions (11)Used By (0)

Audit class generator
=====================

[](#audit-class-generator)

This simple package adds pseudorandomized audit tags to your Twig HTML class definitions.

This can be useful if you don't have traditional debugging tools available.

By seeing a short, pseudorandom audit tag among the classes applied to an HTML element, you can quickly determine exactly which Twig template the HTML element came from.

That can save significant debugging time, since you don't have to guess at which Twig template to modify for a given task.

In other words, if you can view the source in a browser, you can now grep definitively for any HTML tag that already has a "class" attribute, finding exactly which Twig template generated that DOM element. Pretty neat!

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

[](#installation)

To install this tool as a dev dependency:

```
composer require --dev patrick-maynard/audit-class-generator

```

Installing this in a production environment is not recommended.

Usage
-----

[](#usage)

Once the tool has been installed, you can run it directly from Composer’s `vendor/bin` with default configuration

```
vendor/bin/audit-class-generator
```

This will open a new git branch and apply temporary audit classes to any Twig HTML elements that already have a "class" attribute defined.

Then view the source of the page you want to debug in a browser. You'll see that any tag that already had a "class" attribute now has a unique, pseudorandom class like `audit_34f39d` appended to the class list.

Just grep for that audit class, and you'll find the Twig template you want in a jiffy.

### Configuration

[](#configuration)

Change the template folder
default = `templates/`

```
vendor/bin/audit-class-generator --directory=path/to/templates
```

Change the file extension to filter for
default = `.html.twig`

```
vendor/bin/audit-class-generator --extension=.twig
```

---

Happy debugging!

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance92

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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 ~12 days

Recently: every ~22 days

Total

10

Last Release

48d ago

PHP version history (2 changes)v0.1.0PHP &gt;=7.4

v0.7.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/29e8816b93911c32d13e510f21144e75769e172d46521a89e715f81f3a64c460?d=identicon)[patrickmaynard](/maintainers/patrickmaynard)

---

Top Contributors

[![patrickmaynard](https://avatars.githubusercontent.com/u/17260148?v=4)](https://github.com/patrickmaynard "patrickmaynard (42 commits)")[![steffengrahl](https://avatars.githubusercontent.com/u/14818702?v=4)](https://github.com/steffengrahl "steffengrahl (28 commits)")

---

Tags

debuggingdebugging-tooldebugging-toolstwigtwigdebugginghtml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/patrick-maynard-audit-class-generator/health.svg)

```
[![Health](https://phpackages.com/badges/patrick-maynard-audit-class-generator/health.svg)](https://phpackages.com/packages/patrick-maynard-audit-class-generator)
```

###  Alternatives

[symfony/ux-twig-component

Twig components for Symfony

22018.6M356](/packages/symfony-ux-twig-component)[twig/string-extra

A Twig extension for Symfony String

22150.9M231](/packages/twig-string-extra)[twig/markdown-extra

A Twig extension for Markdown

12116.2M130](/packages/twig-markdown-extra)[symfony/ux-live-component

Live components for Symfony

1647.0M128](/packages/symfony-ux-live-component)[twig/html-extra

A Twig extension for HTML

789.4M78](/packages/twig-html-extra)[twig/cache-extra

A Twig extension for Symfony Cache

412.4M40](/packages/twig-cache-extra)

PHPackages © 2026

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