rapidez/composer-template-diff-plugin
A Composer plugin for Rapidez projects that surfaces template differences when packages are installed or updated, so you can quickly see which Blade template files changed in vendor packages and keep your overrides in sync.
This package tracks and verifies the integrity of your vendor/ directory by comparing it against a stored set of hashes — useful as a lightweight supply-chain tripwire in CI or on shared/staging environments.
composer require --dev <vendor>/<package>
src/Console (or Commands) directory. In 1.1.0 the update command is the entry point you care about — it is what generates/refreshes the hash baseline. Confirm the exact signature with php artisan list after installing.php artisan vendor:publish) and read it before running anything — the defaults determine which paths are hashed and where the manifest lives.composer install from a clean, trusted lockfile, then run the new update command to snapshot the vendor tree, and commit the resulting hash file. That committed baseline is the artifact every later check compares against.If you only do one thing with this package, do that: baseline once, commit it, verify on every CI run.
Generate the baseline as a Composer hook. Wire the update command into post-install-cmd / post-update-cmd in composer.json so the manifest is refreshed whenever dependencies legitimately change, instead of relying on developers to remember:
"scripts": {
"post-install-cmd": ["@php artisan vendor:update-hashes"],
"post-update-cmd": ["@php artisan vendor:update-hashes"]
}
Treat the manifest diff in code review as the security-relevant change — a lockfile bump and a hash bump should appear together.
Verify in CI as a separate, fast job. Run the verification command (or the artisan command without the update flag) before your test suite. Failing early means you aren't paying for a full test run on a tampered or drifted vendor tree. This is far cheaper than composer audit alone because it catches local mutation, not just known CVEs.
Pair it with a clean-install CI step. The only trustworthy baseline is one generated from a composer install against a committed lockfile. In CI, always run composer install --no-dev or equivalent first, then verify — never verify against a cached or reused vendor directory.
Use config for exclusions. The 1.1.0 config support is the right place to exclude packages that legitimately rewrite files at install time (post-install scripts, generated stubs, compiled assets). Exclude narrowly and document why each exclusion exists.
Local pre-push guard. For repos where developers share a vendor cache, a pre-push hook running the verify command catches accidental edits before they reach CI — and gives a clearer error than a red pipeline.
composer install finishes (or inside a post-autoload-dump hook that fires mid-install) can snapshot a half-written vendor/ tree. Prefer post-install-cmd / post-update-cmd, which run after the tree is complete.php artisan config:cache, remember the config is frozen at cache time; config changes require a re-cache. In CI this is usually irrelevant since you're running fresh, but it bites people debugging locally.composer.lock and review upgrades of this package with the same scrutiny as any other security tooling.How can I help you explore Laravel packages today?