Download the PHP package setono/dependency-tracker without Composer
On this page you can find all versions of the php package setono/dependency-tracker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/dependency-tracker
More information about setono/dependency-tracker
Files in setono/dependency-tracker
Package dependency-tracker
Short Description A Composer plugin that snapshots tracked vendor files so changes are visible in git diff
License MIT
Informations about the package dependency-tracker
Dependency Tracker
A Composer plugin that snapshots tracked files and directories from vendor/ into a committed project directory. After each composer install or composer update, any changes in tracked paths become visible via git diff.
Installation
Quick start
Scaffold a config file:
This creates dependency-tracker.php in your project root. Open it and add the vendor paths you want to track:
Run composer install or composer update to trigger the first snapshot. The tracked files are copied into .dependency-snapshots/ where they are visible to git:
What to commit
dependency-tracker.php-- the config file- The entire
.dependency-snapshots/directory -- the snapshots themselves
Do not add .dependency-snapshots/ to .gitignore.
How it works
On every composer install or composer update the plugin:
- Reads
dependency-tracker.phpfrom the project root - For each tracked directory: deletes the snapshot copy entirely and re-copies all matching files. This means additions, modifications, and deletions in vendor are all visible in
git diff. - For each tracked file: copies it to the mirrored location. If the source file was removed from vendor, the snapshot copy is deleted automatically.
Filters
Filters are matched against filenames (not full paths) using fnmatch(). Multiple patterns use OR logic:
Non-recursive mode
By default directories are traversed recursively. To track only the files directly inside a directory:
Configuration reference
Config methods
| Method | Returns | Description |
|---|---|---|
track(string $path) |
Track |
Register a path relative to project root |
setOutputDir(string $dir) |
self |
Set output directory (default: .dependency-snapshots) |
Track methods
| Method | Returns | Default | Description |
|---|---|---|---|
filter(string ...$patterns) |
self |
No filter (all files) | Glob patterns matched against filenames |
recursive(bool $recursive) |
self |
true |
Whether to descend into subdirectories |
When a tracked path is missing
If a tracked path does not exist in vendor/ at run time, the plugin emits a warning and continues processing the remaining tracks. This is not fatal.
Uninstalling
Then delete dependency-tracker.php and .dependency-snapshots/ from your project.
All versions of dependency-tracker with dependencies
composer-plugin-api Version ^2.0
composer/composer Version ^2.8
symfony/console Version ^6.0 || ^7.0 || ^8.0