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.7.0(2mo ago)021[2 PRs](https://github.com/patrickmaynard/audit-class-generator/pulls)MITPHPPHP &gt;=8.0

Since Jan 21Pushed 2mo 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 1mo ago

READMEChangelog (7)Dependencies (2)Versions (8)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`

```
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.

Happy debugging!

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance84

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 56.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 ~5 days

Total

7

Last Release

87d 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

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

---

Tags

debuggingdebugging-tooldebugging-toolstwigtwigdebugginghtml

### 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

[twig/string-extra

A Twig extension for Symfony String

21946.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

777.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)
