Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Composer
  3. Composer-Normalize

Composer-Normalize

MITPHP2.51.0

A Composer plugin that automatically normalizes and formats composer.json files according to a consistent schema.

GitHubGitHub
1.1k stars36 forks0 contributors

What is Composer-Normalize?

composer-normalize is a Composer plugin that automatically normalizes composer.json files to ensure consistent formatting and structure. It applies standardized rules for property ordering, indentation, and schema compliance, eliminating manual formatting efforts and disagreements in collaborative projects.

Target Audience

PHP developers and teams working on projects that use Composer for dependency management, particularly those in collaborative environments where consistent composer.json formatting is important.

Value Proposition

Developers choose composer-normalize because it automates a tedious manual process, provides configurable formatting options, and integrates seamlessly into CI/CD pipelines with dry-run and diff features to enforce consistency without debate.

Overview

🎵 Provides a composer plugin for normalizing composer.json.

Use Cases

Best For

  • Enforcing consistent composer.json formatting across team projects to avoid manual formatting debates.
  • Integrating automated composer.json normalization into CI/CD pipelines to ensure compliance.
  • Updating and validating composer.lock file hashes automatically after normalization changes.
  • Configuring custom indentation styles (space vs. tab) and sizes for composer.json files.
  • Previewing normalization changes with dry-run and diff options before applying them.
  • Managing composer.json files in large open-source PHP projects with multiple contributors.

Not Ideal For

  • Projects not using PHP or Composer for dependency management, such as JavaScript or Python applications.
  • Teams that already use other tools like PHP-CS-Fixer with composer.json rules, leading to redundancy.
  • Development environments where manual composer.json editing is preferred, such as those with strict, custom JSON schemas.

Pros & Cons

Pros

Automated Formatting Consistency

Applies standardized rules to composer.json, including property ordering and indentation, eliminating manual formatting efforts as shown in diff examples with projects like pestphp/pest.

Lock File Validation

Checks if composer.lock is up-to-date and updates its hash automatically after normalization, ensuring file integrity without extra commands.

Flexible Configuration Options

Supports configurable indentation via command-line or composer.json extra settings, allowing teams to customize formatting to their preferences.

CI/CD Integration Ready

Provides --dry-run and --diff options to preview changes without modifying files, making it easy to enforce compliance in continuous integration pipelines.

Cons

Composer-Exclusive Scope

Only normalizes composer.json files, not general JSON files, limiting its utility to PHP projects that rely on Composer.

Plugin Configuration Overhead

Requires enabling the plugin via composer config allow-plugins, adding an extra setup step and potential security considerations as noted in the README.

Schema Dependency Risks

Relies on a fixed normalization schema; if Composer introduces new properties, the tool might not handle them until updated, potentially causing issues.

Frequently Asked Questions

Quick Stats

Stars1,107
Forks36
Contributors0
Open Issues11
Last commit5 days ago
CreatedSince 2018

Tags

#composer#developer-tools#composer-plugin#dependency-management#ci-cd#code-formatting#php#json#automation

Built With

C
Composer
P
PHP

Included in

PHP32.5kComposer904
Auto-fetched 5 hours ago

Related Projects

OctoLinker Browser ExtensionOctoLinker Browser Extension

OctoLinker — Links together, what belongs together

Stars5,355
Forks283
Last commit2 years ago
SatisSatis

Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Stars3,262
Forks533
Last commit5 days ago
Composer/Xdebug-HandlerComposer/Xdebug-Handler

Restart a CLI process without loading the xdebug extension.

Stars2,562
Forks33
Last commit1 month ago
Composer-PatchesComposer-Patches

Simple patches plugin for Composer

Stars1,693
Forks261
Last commit18 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub