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 License Checker Laravel Package

lendable/composer-license-checker

A dev tool that checks Composer dependency licenses against configurable rules to ensure open source compliance and reduce legal risk. Define allowed licenses, vendors, and packages in a PHP config file, then run it in CI. Uses installed.json or composer licenses as its data source.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a standalone Symfony Console CLI (vendor/bin/composer-license-checker), not a Laravel service provider bundle. For a Laravel/PHP codebase this is actually a good fit: it lives entirely in require-dev, has no runtime coupling to the framework, and imposes no bootstrapping, middleware, or container registration cost.
  • Configuration is a PHP-returning-builder file (.allowed-licenses.php) rather than declarative YAML/JSON. That is idiomatic for a PHP shop and allows computed rules (e.g., reading a vendor allow-list from an env var), but it means config is code and must be reviewed as code — no schema validation beyond what the builder enforces.
  • The dependency graph is shallow (Symfony Console/Process components), so it does not drag a large transitive surface into the dev toolchain. Verify with composer why before adoption, since the tool cannot audit itself if it is excluded from the lock file scan.

Integration feasibility

  • Integration cost is genuinely low: one composer require --dev, one config file, one CI step. No application code changes, no migrations, no framework wiring.
  • Two license providers give flexibility: installed.json (default) lets the check run in a minimal CI image with no Composer binary; licenses provider shells out to Composer and is described by the maintainers as the more stable API. This dual-path is a meaningful resilience feature but also a decision the team must standardize on, otherwise results diverge between local and CI runs.
  • JSON output via --format enables ingestion into existing dashboards/alerting, but treat the JSON shape as unstable — no documented schema contract.

Technical risk

  • PHP version churn is the dominant risk. The changelog shows 1.2.0 requiring PHP 8.2, 1.3.0 dropping 8.2, and 1.4.0 requiring 8.4. A dev-only quality tool forcing the whole team and CI image onto 8.4 is an outsized blast radius for the value delivered. Teams on 8.2/8.3 must pin to an older line and accept divergence from upstream, or upgrade the toolchain for a linter.
  • Single-maintainer / low-adoption signal. 14 stars and 0 dependents are weak community signals. Counter-evidence: corporate backing (Lendable), MIT license, changelog and release history, CI badge. This is a typical "internal tool open-sourced" profile — stable while the sponsor uses it, with no external contributor cushion.
  • Provider fragility. The default provider parses Composer's internal installed.json, and the README itself flags potential schema drift. This is an undocumented, unsupported contract with Composer — a Composer minor release is a plausible breakage vector.
  • License-expression handling is the real correctness risk. Disjunctive licensing was only fixed in 1.0.4, and packages with no license declaration required a dedicated fix in 0.1.1. Edge cases (custom/proprietary licenses in private packages, (MIT or GPL-2.0) style expressions, path/VCS repositories) are where false positives will surface and where a legal-compliance gate will lose credibility fastest.
  • False-positive friction. Any check that fails a build on a new transitive dependency's license will be experienced as a blocker by feature teams; without a clean exemption workflow beyond addAllowedPackage, teams will disable the step.

Key questions

  1. What is our fleet's PHP version floor, and can we absorb a tool that tracks the newest PHP minor rather than a supported LTS window?
  2. Who owns the allow-list policy — engineering or legal — and what is the sign-off and change process for adding a license to it?
  3. Which provider do we standardize on: installed.json (fast, schema-fragile) or composer licenses (needs Composer runtime, stable API)?
  4. Does the tool exit non-zero on violation by default, and can we run it in report-only mode initially?
  5. Does it correctly resolve licenses for private packages, path repositories, and metapackages, and does it tolerate empty/absent license fields without crashing?
  6. Is JSON output stable enough to build alerting on, or must we treat it as a human-only report?
  7. What is the maintainer's stated support policy across major PHP versions, and is there any external contributor base beyond the sponsor?

Integration Approach

Stack fit

  • Works cleanly in any Composer-managed Laravel app, including monorepos and multi-app repositories, because it operates on composer.lock/installed.json rather than application code.
  • No collision with existing Laravel tooling (Pint, PHPStan, Pest); it slots into the lint/static-analysis stage of the pipeline as a parallel, independent step.
  • Because it is dev-only, it introduces no production runtime exposure and no container image change beyond the CI image's PHP version.

Migration path

  • Phase 1 — Visibility only. Add the package, generate a baseline config from the current dependency set (allow everything currently present), and run in a non-blocking CI job. This establishes the real distribution of licenses and exposes edge cases before anyone is gated.
  • Phase 2 — Tighten the allow-list. Remove blanket exemptions, convert them into a curated license list plus addAllowedVendor for first-party and addAllowedPackage for known exceptions. Each exemption gets an owner and a review date.
  • Phase 3 — Enforce. Make the step blocking on pull requests, or on a nightly scheduled run plus a merge queue gate to reduce developer friction on every commit.
  • Phase 4 — Standardize. Extract the allow-list into a shared, versioned package (or a template repo) so dozens of services do not each carry a drifting copy of the policy.

Compatibility

  • Pin to an exact minor (1.3.x for PHP 8.2/8.3 shops, 1.4.x for 8.4+) and record the pin rationale in the repo. Renovate/Dependabot must be configured to open, not auto-merge, PHP-minor-bump releases of this package.
  • Validate the chosen provider against the CI image before enforcing: installed.json requires composer install to have run; the licenses provider requires the Composer binary on PATH.
  • Confirm behavior under --no-dev installs, since dev-only installs change what installed.json contains.

Sequencing

  1. Confirm PHP floor and pick the package major.
  2. Add dev dependency and config in a single low-traffic repository as a pilot.
  3. Instrument: capture JSON output in the pilot for two to four weeks to measure noise rate and identify exemptions.
  4. Publish the allow-list and exemption process before enabling enforcement — policy precedes gate.
  5. Roll out to remaining repositories via template/automation; only then enable blocking checks broadly.

Operational Impact

Maintenance

  • Ongoing effort is low in steady state: one config file plus a pinned version. The real maintenance cost is policy maintenance — the allow-list must be reviewed when new dependencies or licenses enter the tree.
  • Upstream release cadence is moderate but concentrated on dependency/PHP-version housekeeping rather than features. That means upgrades rarely add value and frequently raise the PHP floor; treat upgrades as annual, deliberate events, not routine chores.
  • Because the repo carries a changelog and releases, tracking breaking changes is feasible. The absence of a documented support matrix across PHP versions is the gap to compensate for internally.

Support

  • No commercial support; MIT-licensed community/sponsor-backed project. Internal ownership must be explicit — name a team and a person as the maintainer of the config and the CI integration, plus a legal stakeholder for the policy itself.
  • Expect to self-diagnose issues, particularly installed.json parsing failures after Composer upgrades. Keep a documented fallback: switch --provider-id=licenses and re-run.
  • A 0-dependent, 14-star project means no community forum to lean on. Budget for the possibility of a fork or a switch to an alternative license-audit tool if the sponsor abandons it.

Scaling

  • The tool is O(dependencies) and trivially fast; performance is not a scaling concern even in large monorepos.
  • Organizational scaling is the concern: dozens of repos each maintaining an allow-list guarantees drift and inconsistent legal posture. Mitigate with a shared config package or a scheduled central audit that aggregates JSON output across repositories.
  • For monorepos containing multiple Composer roots, the check must be invoked per composer.json location — plan the CI matrix accordingly rather than assuming a single invocation covers everything.

Failure modes

  • Schema drift in installed.json — Composer update breaks parsing; job fails or, worse, silently reports incomplete results. Mitigation: pin the licenses provider in CI, or run both and diff.
  • PHP floor escalation — an auto-merged minor bump breaks the entire CI image and every developer's local install for a non-critical lint step. Mitigation: pin, do not auto-merge.
  • False positives block releases — a new transitive dependency with an unusual or composite license halts a release train. Mitigation: report-only mode on branches, blocking only on a nightly or merge-queue gate; a fast documented exemption path.
  • False negatives create legal exposure — packages with no declared license or with compound expressions being waved through. Mitigation: run in a --format json mode and explicitly track "unknown license" packages as a distinct, visible class rather than silently passing.
  • Silent enforcement erosion — teams add addAllowedPackage broadly to unblock themselves, hollowing out the policy. Mitigation: require a linked ticket and expiry on exemptions; audit exemption list growth monthly.
  • CI image coupling — the licenses provider's dependency on a Composer binary in the build image is an implicit requirement that breaks when images change.

Ramp-up

  • Engineer ramp-up is under an hour: read the README, write the config, add the CI line. This is a low-cognitive-load tool.
  • The genuine ramp-up cost is organizational and legal, not technical: assembling the initial allow-list, getting legal sign-off, defining the exemption workflow, and socializing the gate with feature teams. Budget days-to-weeks for this, not hours.
  • Given the low adoption signals and the aggressive PHP-version policy, this is best adopted as a small, reversible, report-only pilot. Value is high if the org has real compliance obligations (fintech, healthcare, enterprise procurement); if not, the maintenance and PHP-floor risk likely outweighs the benefit.
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.
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
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode