ergebnis/composer-normalize
Composer plugin that automatically normalizes composer.json: consistent key ordering, formatting, and whitespace to reduce diffs and style debates. Install as a dev dependency, allow the plugin, and run it in CI to keep composer.json tidy and predictable.
composer.json files across a Laravel/PHP codebase to reduce merge conflicts, improve readability, and enforce consistency in dependency management.composer.json is not normalized).composer.json formatting preferences.composer.json formatting in monorepos or large codebases.composer.json files across a codebase.Adopt if:
composer.json formatting (e.g., misordered keys, mixed indentation, or unstructured sections).composer.json files (e.g., using --dry-run in CI).Look elsewhere if:
composer.json files are already standardized and minimal changes are needed (overhead of tooling may not justify benefits).composer.json structures).composer-normalizer by mlocati, though this package offers more Laravel-aligned defaults).*"This package solves a hidden productivity drain in our PHP/Laravel projects: inconsistent composer.json formatting. Currently, contributors spend time debating or manually fixing formatting issues in PRs, slowing down development. By adopting ergebnis/composer-normalize, we can:
composer.json files, reducing merge conflicts and manual work.*"This tool normalizes composer.json files to a consistent, Laravel-friendly format, addressing pain points like:
require, require-dev, autoload).composer normalize --dry-run to your CI pipeline to block non-compliant PRs (e.g., GitHub Actions/GitLab CI).composer normalize locally or via pre-commit hooks.How to adopt:
composer require --dev ergebnis/composer-normalize.composer config allow-plugins.ergebnis/composer-normalize true.composer normalize (or integrate with Husky for pre-commit checks).composer normalize --dry-run to fail builds on formatting issues.Example impact: Projects like PestPHP use this to keep composer.json clean—we can too. Let’s prototype this in [Project X] and measure PR cycle time improvements."*
How can I help you explore Laravel packages today?