traw/report-composer-diff

Maintainers

Package info

github.com/thomasrawiel/report-composer-diff

pkg:composer/traw/report-composer-diff

Statistics

Installs: 124

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.5.1 2026-02-24 11:15 UTC

This package is auto-updated.

Last update: 2026-02-24 11:17:10 UTC


README

This Symfony Console command compares composer.lock files between two Git references (tags, branches, or commits) and generates a detailed report of package changes.

Key features:

  • Supports specifying source (--from) and target (--to) Git tags; if not provided, falls back to the two latest tags.
  • Reads composer.lock directly from Git without checking out the refs.
  • Detects changes, even if only branches are used (Branch names in composer.json must start with dev-, for example dev-develop)
  • Classifies packages into added, removed, updated, and unchanged.
  • Supports custom groups based on package name prefixes, in addition to built-in TYPO3 groups. Multiple prefixes per group are allowed.
  • Outputs results in multiple formats: console, HTML, JSON, Markdown, or plain text.
  • Generates a summary table per group and a detailed per-package report.

Installation

I recommend installing in dev environment

composer require traw/report-composer-diff --dev

Usage

--html          - Write report.html
--json          - Write report.json
--txt           - Write report.txt
--md            - Write report.md
--filename      - Filename (& directory) where the report should be saved (needs --html, --md, --txt or --json)
--from          - Begin at git-ref
--to            - Stop at git-ref
--repo          - change directory
--group         - add one or more custom groups in the format groupname:prefix/,prefix2/,prefix3
--repo          - path to the .git repo
--include-dev   - Include dev-packages installed with `require-dev`

CLI table output

bin/php vendor/bin/composer-diff

Writes report.html

php vendor/bin/composer-diff --html

Writes report.json

php vendor/bin/composer-diff --json

Compare Tags

php vendor/bin/composer-diff --from=v12.4.2 --to=v12.4.3 --html

Use a specific repository

php vendor/bin/composer-diff --repo=/home/user/projects/myrepo

Compare Tag to current

php vendor/bin/composer-diff --from=1.0.0 --html

Compare Branch to Branch

php vendor/bin/composer-diff --from=develop --to=main --html

Write to a subdirectory

php vendor/bin/composer-diff --html --filename=report/report.html

Custom group

php vendor/bin/composer-diff --group=mmygroup:traw/ --group=mycompany:namespaceprefix/

Multiple prefixes in one group - groupname:comma-list

php vendor/bin/composer-diff --group=mycompany:prefix1/,prefix2/,prefix3