Weave 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 Parser Laravel Package

mcstreetguy/composer-parser

A PHP library for parsing composer.json and composer.lock files into structured, object-oriented data. It exposes package metadata, dependencies, version constraints, and lockfile contents, making Composer projects easy to inspect programmatically.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy for internal developer tooling. If your roadmap includes a dependency dashboard, a package catalog, license-compliance reporting, or a monorepo manifest scanner, this package is a shortcut for the "read and model composer.json / composer.lock" layer. It replaces a few days of json_decode plumbing plus a schema model with a small MIT-licensed dependency — a cheap way to validate a feature before committing engineering time.
  • Roadmap scoping for dependency governance features. Concretely supports: license inventories across a PHP estate, "which services pin which versions" reports, upgrade/migration tooling (e.g., Composer 1 → 2 audits), SBOM-adjacent exports, and CI guardrails that fail builds on disallowed packages or licenses. Use it to prototype these cheaply and get real stakeholder feedback before funding a platform team.
  • Prioritization signal for platform work. Because the library is small and unopinionated, how much value it unlocks tells you how much demand exists for the broader capability. If a weekend prototype on top of it gets traction, that's evidence to prioritize the real feature; if nobody uses the prototype, deprioritize.
  • Buy-vs-fork calculus. MIT license and a compact surface mean you can vendor or fork it with low legal friction — a legitimate option when you need a parser now and can accept maintenance ownership later.

When to Consider This Package

Adopt it when all of the following hold:

  • You are building PHP-side tooling that must read Composer manifests programmatically — CI checks, internal portals, migration scripts, audit jobs — and you want objects rather than raw arrays.
  • You need something today for a prototype or internal-only tool, where an abandoned dependency is an acceptable risk.
  • Your manifests are conventional: standard composer.json/composer.lock files without heavy reliance on Composer 2-era features, plugin-generated structures, or exotic repositories/extra blocks.

Look elsewhere when:

  • Maintenance risk is unacceptable. Last release was September 2019 — before Composer 2 (Oct 2020) and PHP 8 (Nov 2020) — with 7 stars and zero dependents. There is effectively no community to catch schema drift or security issues. For anything production-facing or customer-facing, prefer composer's own APIs, composer/semver, or direct JSON parsing with a schema you control.
  • You only need a field or two. json_decode() plus a validation layer is smaller and has no supply-chain cost.
  • You need authoritative SBOM or vulnerability output. Use CycloneDX/SPDX tooling or the Composer CLI's own commands; a 2019 parser is not the right foundation for compliance artifacts.
  • You're outside the PHP/Composer ecosystem. This has no relevance to npm, Maven, or Go module estates.
  • Your team can't own a fork. If nobody will patch it, don't take the dependency.

How to Pitch It (Stakeholders)

To executives: This is a small, free, permissively licensed building block that lets us prototype dependency-visibility features — license audits, version sprawl reports, upgrade planning — in days rather than weeks. It is not a strategic platform bet: it is unmaintained since 2019 with essentially no user base, so I recommend using it only for internal prototypes, with a clear decision gate before we would ever ship it in a customer-facing path. Worst case, we vendor the ~small codebase and own it; best case, it saves us a sprint of plumbing and tells us whether the feature is worth funding.

To engineering: An OOP wrapper over Composer manifest parsing — objects for packages, requirements, and lock entries instead of hand-rolled array traversal. MIT, no transitive baggage of note, easy to vendor. Caveats you should weigh: it predates Composer 2 and PHP 8, has no dependents to shake out bugs, and has no release cadence. If we adopt it, treat it as a pinned internal dependency, wrap it behind our own interface so it can be swapped, and budget a fork if we hit schema gaps.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings