Download the PHP package jbzoo/composer-diff without Composer
On this page you can find all versions of the php package jbzoo/composer-diff. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbzoo/composer-diff
More information about jbzoo/composer-diff
Files in jbzoo/composer-diff
Package composer-diff
Short Description See what has changed after a composer update.
License MIT
Informations about the package composer-diff
JBZoo / Composer-Diff
A powerful CLI tool for visualizing changes in Composer dependencies after running composer update. Compare two composer.lock files and see exactly what packages were added, removed, upgraded, or downgraded with beautiful output formatting and direct links to changelogs.
Table of Contents
- Features
- Installation
- Via Composer (Recommended)
- Standalone PHAR
- Basic Usage
- Help Description
- Output Examples
- Default view (--output=console)
- Markdown Output (--output=markdown)
- JSON Output (--output=json)
- Advanced Usage
- Compare Specific Files
- Environment Filtering
- Output Formatting
- Real-world Examples
- Requirements
- Architecture
- Change Detection Logic
- Supported Git Platforms
- Development
- Setup
- Testing
- Building PHAR
- Roadmap
- License
- See Also
Features
- Visual Dependency Tracking: See exactly what changed after
composer updatewith color-coded output - Multiple Output Formats: Console tables, Markdown for PRs, or JSON for automation and CI/CD pipelines
- Smart Version Detection: Automatically detects upgrades, downgrades, new, removed, and changed packages
- Direct Links to Changes: Generates comparison URLs for GitHub, GitLab, and Bitbucket repositories
- Environment Filtering: Compare production (
require) and development (require-dev) dependencies separately or together - Git Integration: Compare current lock file with any git reference (HEAD, branches, tags)
- Dev Package Support: Handles dev branches with commit hash detection and comparison
- CI/CD Friendly: Perfect for automated workflows, deployment pipelines, and Pull Request automation
- PHAR Distribution: Standalone executable or Composer installation options
Installation
Via Composer (Recommended)
Standalone PHAR
Basic Usage
Help Description
Output Examples
Default view (--output=console)
Rendered in your terminal:

Also, see colored example in travis-ci

Markdown Output (--output=markdown)
Source code:
Rendered in your readme or PR/MR description:
| Package | Action | Old Version | New Version | |
|---|---|---|---|---|
| vendor/downgraded | Downgraded | 2.0.0 | 1.0.0 | See details |
| vendor/new | New | - | 1.0.0 | |
| vendor/no-tag | Changed | dev-master@bbc0fba | dev-master@f2f9280 | See details |
| vendor/no-tag-new | New | - | dev-develop@a999014 | |
| vendor/removed | Removed | 1.0.0 | - | |
| vendor/upgraded | Upgraded | 1.0.0 | 2.0.0 | See details |
JSON Output (--output=json)
Advanced Usage
Compare Specific Files
Environment Filtering
Output Formatting
Real-world Examples
Requirements
- PHP: ^8.2
- Extensions: ext-json, ext-filter
- Composer: ^2.0 (for development)
Architecture
The tool is built with a clean, object-oriented architecture:
DiffAction: Main CLI command handler (Symfony Console)Comparator: Orchestrates comparison between composer.lock filesComposerLock: Parses and manages composer.lock dataPackage: Represents individual packages with version handlingDiff: Compares package versions and determines change typesUrl: Generates comparison URLs for Git hosting platforms- Renderers: Multiple output formats (Console, Markdown, JSON)
Change Detection Logic
The tool intelligently categorizes changes:
- New: Package added to dependencies
- Removed: Package removed from dependencies
- Upgraded: Semantic version increased (1.0.0 → 2.0.0)
- Downgraded: Semantic version decreased (2.0.0 → 1.0.0)
- Changed: Dev branches with different commit hashes
- Same: No changes (filtered out by default)
Supported Git Platforms
Automatically generates comparison URLs for:
- GitHub:
github.com/user/repo/compare/v1.0.0...v2.0.0 - GitLab:
gitlab.com/user/repo/compare/v1.0.0...v2.0.0 - Bitbucket:
bitbucket.org/user/repo/branches/compare/v1.0.0%0Dv2.0.0
Development
Setup
Testing
Building PHAR
Roadmap
- [ ] Supporting Drupal repos. For example.
- [ ] Add action in the composer via API like
composer lock-diff. - [ ] Fixes the same issue with complex/custom name of tag.
- [ ] Auto-detecting alias name of branch.
- [ ] No warp links for Markdown format.
- [ ] (?) Support MS Windows...
Unit tests and check code style
License
MIT
See Also
- CI-Report-Converter - Converting different error reports for deep compatibility with popular CI systems.
- Composer-Graph - Dependency graph visualization of composer.json based on mermaid-js.
- Mermaid-PHP - Generate diagrams and flowcharts with the help of the mermaid script language.
- Utils - Collection of useful PHP functions, mini-classes, and snippets for every day.
- Image - Package provides object-oriented way to manipulate with images as simple as possible.
- Data - Extended implementation of ArrayObject. Use files as config/array.
- Retry - Tiny PHP library providing retry/backoff functionality with multiple backoff strategies and jitter support.
- SimpleTypes - Converting any values and measures - money, weight, exchange rates, length, ...
Special thanks to the project davidrjonas/composer-lock-diff which inspired me to make a great utility :)
All versions of composer-diff with dependencies
ext-json Version *
ext-filter Version *
jbzoo/data Version ^8.0
jbzoo/markdown Version ^8.0
jbzoo/cli Version ^8.0
symfony/console Version >=7.3.4
symfony/process Version >=7.3.4
composer/semver Version >=3.0