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

lendable/composer-license-checker

Checks your Composer dependencies’ licenses against configurable allow rules (by SPDX license, vendor, or package) to help ensure OSS compliance and reduce legal risk. Works in CI and can read license data from Composer’s installed.json or composer licenses.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Purpose Alignment: Remains aligned with compliance-driven development in PHP/Laravel ecosystems, though the PHP 8.4 requirement may introduce friction for teams still on PHP 8.1–8.3 (Laravel 10/11 default). Useful for enforcing dependency licensing in CI/CD pipelines or pre-commit hooks.
  • Non-Invasive: Still operates at the Composer layer, requiring no Laravel-specific modifications. Works as a standalone tool or via Composer scripts (composer check-license).
  • Extensibility: Custom rule sets (e.g., blacklisting GPLv3, whitelisting MIT) remain adaptable, but Symfony 8 compatibility may indirectly affect dependency trees in Laravel projects using Symfony components.

Integration Feasibility

  • Low Coupling: Invocation methods unchanged (Composer scripts, CI/CD hooks, PHPUnit listeners).
  • Dependency Overhead:
    • Breaking Change: PHP 8.4 requirement may force upgrades for teams on older versions.
    • Symfony 8 Support: No direct impact on Laravel unless using Symfony packages (e.g., symfony/console in custom scripts).
  • Output Format: Unchanged (JSON/human-readable reports), easing integration with monitoring tools.

Technical Risk

  • PHP Version Risk:
    • High for PHP 8.1–8.3 users: Upgrade path may require testing (e.g., Laravel 10/11 compatibility).
    • Low for PHP 8.4+ users: No material changes.
  • False Positives/Negatives: Persists as a risk; rules may still need tuning for edge cases (e.g., dual-licensed packages).
  • Performance: Scanning large dependency trees remains a potential CI/CD bottleneck.
  • Rule Maintenance: Custom rules may still require updates for new licenses (e.g., SPDX changes).

Key Questions

  1. PHP Version Compatibility:
    • Can the team upgrade to PHP 8.4 for this package, or are there blocking dependencies (e.g., legacy Laravel versions)?
    • If stuck on PHP 8.1–8.3, should this package be deprioritized or replaced with an alternative?
  2. Symfony Dependency Impact:
    • Does the Laravel project use Symfony 8+ components (e.g., symfony/console, symfony/http-client) that might conflict with this update?
  3. Rule Granularity: Unchanged, but now critical to validate against PHP 8.4’s ecosystem (e.g., new license trends in Symfony 8).
  4. CI/CD Placement: Where to run checks (e.g., post-install, pre-merge) given potential PHP version constraints?
  5. Migration Strategy:
    • Should PHP 8.4 adoption be tied to this package, or decoupled for broader compatibility?

Integration Approach

Stack Fit

  • PHP/Laravel:
    • Breaking for PHP <8.4: Requires upgrade or alternative tooling (e.g., composer-license-checker fork or roave/security-advisories).
    • Symfony 8: No direct impact unless using Symfony packages; otherwise, unchanged.
  • CI/CD: Works with GitHub Actions/GitLab CI, but PHP 8.4 may need explicit matrix testing.
  • Dev Tools: Pairing with Laravel Forge/Envoyer or Valet/Sail remains viable for PHP 8.4 users.

Migration Path

  1. Assess PHP Version:
    • If PHP 8.4+: Proceed with standard integration (see prior assessment).
    • If PHP <8.4:
      • Option 1: Upgrade PHP to 8.4 (test Laravel/Symfony compatibility).
      • Option 2: Use a forked version of the package with PHP 8.1+ support.
      • Option 3: Replace with an alternative (e.g., composer-license-checker v1.3.x or roave/security-advisories).
  2. Pilot Phase (PHP 8.4+):
    • Add to composer.json:
      "scripts": {
        "check-license": "composer-license-checker --format=json --rules=rules.json"
      }
      
    • Define rules.json and test locally.
  3. CI Integration (PHP 8.4+):
    • Add to .github/workflows/compliance.yml:
      jobs:
        license-check:
          runs-on: ubuntu-latest
          steps:
            - uses: actions/checkout@v4
            - uses: shivammathur/setup-php@v2
              with:
                php-version: '8.4'
            - run: composer check-license
      
  4. Gradual Enforcement:
    • Start with warnings, then block builds.
    • Exempt legacy dependencies temporarily if needed.

Compatibility

  • Composer Version: Still supports Composer 2.0+ (Laravel’s minimum).
  • PHP Version:
    • Minimum: Now PHP 8.4 (breaking change).
    • Laravel Impact: Laravel 11+ defaults to PHP 8.2; Laravel 10 uses PHP 8.1. Upgrade may be required.
  • Symfony Compatibility: Indirectly supports Symfony 8 (no direct Laravel impact unless using Symfony packages).

Sequencing

  1. PHP Upgrade (if needed):
    • Test Laravel/Symfony components on PHP 8.4.
    • Update php.ini, Dockerfiles, or CI matrices.
  2. Pre-Merge: Run in PR pipelines for PHP 8.4+ projects.
  3. Post-Install: Block deployments with invalid licenses (e.g., in Envoyer).
  4. Scheduled: Weekly scans for compliance drift.

Operational Impact

Maintenance

  • Rule Updates: Unchanged; occasional rules.json tweaks needed.
  • Dependency Tracking: Monitor Symfony 8 license changes and Packagist metadata.
  • PHP Version Maintenance:
    • High for PHP <8.4 users: May require long-term fork or alternative.
    • Low for PHP 8.4+ users: Aligns with Composer updates.

Support

  • Debugging: Error messages remain clear, but PHP 8.4-specific issues (e.g., deprecations) may arise.
  • Documentation: No updates; relies on Composer ecosystem.
  • Community: Low activity; MIT license avoids lock-in, but PHP 8.4 requirement may reduce adoption.

Scaling

  • Performance: Unchanged; cache license data for large repos.
  • Distributed Teams: Centralize rules.json in a shared repo.
  • PHP 8.4 Constraint: May limit adoption in teams with legacy stacks.

Failure Modes

Failure Impact Mitigation
PHP 8.4 upgrade blocked Cannot use package Fork package or use alternative
False positive block Valid dependency rejected Tune rules or add exemptions
CI timeout Slow scans in large repos Cache results or run in parallel
Symfony 8 license drift New violations in Symfony deps Update rules.json for Symfony 8
Rule misconfiguration Overly permissive/restrictive Review with legal/compliance team

Ramp-Up

  • Onboarding Time:
    • PHP 8.4+: <1 hour for setup; 1 day for CI integration.
    • PHP <8.4: 2–5 hours (upgrade path + testing).
  • Training Needed:
    • Developers: Understand rules.json syntax and PHP 8.4 constraints.
    • DevOps: Configure CI with PHP 8.4 matrices.
  • Adoption Barriers:
    • PHP version resistance: Mitigate with phased upgrades or alternatives.
    • Initial rule configuration: Template available in repo.
    • Symfony dependency risks: Audit Symfony packages pre-upgrade.
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.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony