From 869189b0af9129b6ab93de3715f8a962be475a46 Mon Sep 17 00:00:00 2001 From: Steffen Grahl Date: Sun, 22 Feb 2026 12:42:56 +0100 Subject: [PATCH] Remove Git branch creation and checkout from code and documentation --- README.md | 4 +++- bin/audit-class-generator | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8ba0a75..1df6f4d 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,15 @@ Installing this in a production environment is not recommended. ## Usage +> ⚠️ **Warning:** Always create a new Git branch before running this tool. Otherwise, you may accidentally commit the generated audit classes to your production branch. + Once the tool has been installed, you can run it directly from Composer’s `vendor/bin` ```bash 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. +This will 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. diff --git a/bin/audit-class-generator b/bin/audit-class-generator index 3038b58..c92caa5 100755 --- a/bin/audit-class-generator +++ b/bin/audit-class-generator @@ -30,11 +30,8 @@ if (isset($options['h']) || isset($options['help'])) { $config = Config::create($options); -//First, we need to be on a safe git branch, since this set of changes will mess with lots of files -exec('git checkout -b temporary-template-audit-branch-remove-me-soon'); - echo PHP_EOL; -echo "Temporary git branch created. Iterating through templates ... "; +echo "Iterating through templates ... "; echo PHP_EOL; $applier = new Applier();