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

Php Composer Reader Laravel Package

nadar/php-composer-reader

Small PHP library to read and manipulate composer.json. Load and validate readability/writability, dump full content, and work with typed section readers (e.g., require, autoload PSR-4) to iterate packages/namespaces, inspect constraints, and add sections.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Developer Tooling & Automation: Expanded support for array input (PR #16) enables programmatic manipulation of composer.json data without file I/O, useful for:
    • Dynamic dependency generation (e.g., injecting runtime configs into composer.json arrays).
    • Testing/validation pipelines where mock composer.json structures are needed.
  • Composer CLI Integration: New command output methods (PR #17) allow parsing composer CLI output (e.g., composer show) directly in PHP, bridging gaps between CLI tools and programmatic workflows.
  • PHP 8.3/8.4 Compatibility: Future-proofs Laravel/PHP projects using modern PHP versions, reducing migration friction.
  • Custom Composer Plugins: Array input support simplifies building plugins that modify dependency structures in-memory (e.g., dependency graph analyzers).
  • Cost Savings: Continued MIT licensing and lightweight design reinforce its value as a "build vs. buy" alternative.

When to Consider This Package

  • Look Here If:

    • You need array-based composer.json manipulation (e.g., merging configs, dynamic generation) without file parsing.
    • Your workflows require parsing composer CLI output (e.g., extracting dependency trees, version info) in PHP.
    • You’re using PHP 8.3/8.4 and want a maintained, up-to-date library (last release: 2025-01-02).
    • You’re building internal tools (e.g., dependency auditors, migration scripts) that interact with composer.json programmatically.
  • Look Elsewhere If:

    • You only need CLI interaction with Composer (use composer commands or Symfony’s Process component).
    • Your project is JavaScript/TypeScript-heavy (consider node-composer or composer-json npm packages).
    • You require advanced Composer features (e.g., platform config, scripts execution) beyond JSON parsing/CLI output.
    • The package’s maintenance activity (2 new contributors in 2025) is insufficient for your risk tolerance—evaluate alternatives like webmozart/composer-merge-plugin if stability is critical.

How to Pitch It (Stakeholders)

To Executives: "This updated package now supports direct array manipulation of composer.json and parsing composer CLI output—enabling deeper automation for dependency management, security scans, and custom build tools. With PHP 8.3/8.4 support and recent contributions, it’s a low-risk, high-reward choice for internal tooling. Avoids vendor lock-in and reduces dev time compared to proprietary solutions."

To Engineering: *"The latest release adds two major features:

  1. Array input support (PR #16): Modify composer.json structures in-memory (e.g., for dynamic dependency generation or testing).
  2. CLI output parsing (PR #17): Extract composer command results (e.g., composer show) directly in PHP—no more shelling out to CLI tools.

Use cases to prototype:

  • CI/CD: Auto-generate composer.json patches for dev dependencies.
  • Plugins: Build tools that analyze/transform dependency graphs without file I/O.
  • Testing: Simulate composer.json configs in unit tests.

Let’s test it for [specific use case]—it’s a drop-in upgrade with zero breaking changes and modern PHP support."*

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.
aimeos/prisma
besmartand-pro/php-quality-config
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor
spatie/laravel-javascript-views