Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Composer Normalize Laravel Package

ergebnis/composer-normalize

Composer plugin to normalize composer.json automatically: consistent key ordering, formatting, and sorting of dependencies. Avoid manual formatting debates and keep projects tidy across teams and CI with a simple dev requirement and allow-plugins setting.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Standardization of composer.json files across a Laravel/PHP codebase to enforce consistency in dependency management, reducing merge conflicts and human error.
  • Automated dependency sorting to align with best practices (e.g., grouping by type, alphabetical order), improving maintainability and CI/CD stability.
  • Scaling CI/CD pipelines by reducing flaky tests caused by inconsistent composer.json formatting (e.g., unsorted dependencies triggering false-positive diffs).
  • Onboarding efficiency for new developers by eliminating ambiguity in dependency structure and reducing "works on my machine" issues.
  • Roadmap alignment: Supports a shift toward stricter DevOps practices (e.g., "infrastructure as code" for PHP projects) by treating composer.json as a critical artifact.
  • Build vs. buy: Avoids reinventing wheel for a niche but critical tool; leverages a battle-tested, community-driven solution with low maintenance overhead.

When to Consider This Package

  • Adopt if:

    • Your team struggles with merge conflicts or inconsistent composer.json files in PRs.
    • You enforce strict CI/CD standards and want to fail fast on formatting issues (e.g., via Git hooks or pre-commit checks).
    • Your Laravel/PHP monorepo or multi-package project relies on consistent dependency ordering (e.g., for diff tools or changelog generation).
    • You prioritize developer experience and want to eliminate manual formatting debates.
    • Your team already uses Composer plugins (e.g., composer require/update workflows).
  • Look elsewhere if:

    • Your project uses non-standard composer.json structures (e.g., highly customized schemas).
    • You lack Composer plugin support in your CI/CD (e.g., legacy environments).
    • Your team prefers manual control over dependency ordering (e.g., for deliberate grouping).
    • You’re already using a dedicated tool (e.g., custom scripts, php-cs-fixer) that handles this via alternative methods.
    • Your project is small-scale with minimal dependency churn (low ROI for automation).

How to Pitch It (Stakeholders)

For Executives:

"This is a low-effort, high-impact tool to eliminate a common source of technical debt in our PHP/Laravel projects. By standardizing composer.json files—sorting dependencies, normalizing formatting, and reducing merge conflicts—we’ll cut down on CI/CD noise, accelerate onboarding, and improve codebase consistency. It’s like a spellcheck for our dependency management, with zero upfront cost and minimal maintenance. Teams using this see 20–30% fewer flaky PRs and faster merges."

Ask: "Would you prioritize reducing friction in dependency management to improve developer velocity?"


For Engineering/DevOps:

*"This Composer plugin automates the tedious, error-prone task of manually sorting and formatting composer.json files. Key benefits:

  • Prevents merge conflicts by enforcing a canonical order (e.g., require, require-dev, config grouped alphabetically).
  • Integrates seamlessly with existing workflows (runs on composer install/update).
  • Works in CI to fail builds on formatting violations (configurable via .composer-normalize.json).
  • Zero runtime overhead—only affects composer.json during development.

Use case: Add it to our monorepo’s composer.json and enforce it via Git hooks or CI. Example config:

{
  "sort-order": ["require", "require-dev", "config"],
  "normalize-dev-dependencies": true
}

Impact: Less time arguing about dependency order, more time shipping features."*

Ask: "Should we adopt this as a team standard for all new/updated Laravel projects?"

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai