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

Dependencies Laravel Package

hermes/dependencies

Hermes is a CLI dev tool that exports your project’s Composer and/or NPM dependencies to a markdown report. Run vendor/bin/hermes and use flags for composer, package, all, custom path, and configurable output location.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture Fit

  • Limited Laravel Integration: The package is a CLI tool for dependency extraction (Composer/NPM) and does not provide direct Laravel-specific functionality (e.g., dependency injection, service providers, or Eloquent hooks). It operates at the project root level, not within Laravel’s application layer.
  • Output-Oriented: Generates Markdown files (not database records, API responses, or Laravel-specific artifacts). Useful for documentation but not for runtime logic.
  • No Event Hooks/Observers: Lacks Laravel-compatible event listeners or service container integration, limiting use cases like automated dependency validation during deployment.

Integration Feasibility

  • Low Coupling: Can be invoked via Artisan commands or CI/CD pipelines (e.g., GitHub Actions) without modifying Laravel’s core.
  • Dependency Extraction Only: No support for:
    • Dynamic dependency resolution (e.g., runtime checks).
    • Conflict detection between Laravel and Composer/NPM versions.
    • Integration with Laravel’s config/cache or vendor lifecycle.
  • Output Flexibility: Customizable paths/output files, but requires manual handling of Markdown (e.g., parsing into Laravel’s documentation system like laravel/docs).

Technical Risk

  • False Positives in "Dependencies": The package conflates direct dependencies (e.g., laravel/framework) with transitive dependencies (e.g., symfony/console). Risk of misleading documentation if not filtered.
  • NPM Scope: Limited to package.json; ignores yarn.lock or pnpm-lock.yaml, which may cause inconsistencies in monorepos or hybrid PHP/JS projects.
  • No Laravel-Specific Validation: Cannot enforce Laravel’s semantic versioning rules (e.g., ^8.0 vs ~8.0) or detect incompatible packages (e.g., doctrine/dbal vs laravel/tinker).
  • Maintenance Risk: Single-author, low-activity project (1 star, no dependents). Risk of abandonment or breaking changes in minor updates.

Key Questions

  1. Use Case Clarity:
    • Is this for documentation (e.g., README.md) or runtime validation (e.g., pre-deploy checks)?
    • If documentation, how will Markdown output integrate with Laravel’s existing systems (e.g., laravel/docs)?
  2. Alternatives:
    • Why not use Composer’s built-in composer why or composer show for PHP dependencies?
    • For NPM, why not npm ls --all or tools like madge for dependency graphs?
  3. Laravel-Specific Needs:
    • Does the team need dependency conflict detection (e.g., laravel/framework vs illuminate/support)?
    • Is there a need for automated dependency updates (e.g., via Laravel Forge/Envoyer)?
  4. CI/CD Integration:
    • How will this fit into existing pipelines (e.g., running vendor/bin/hermes in phpunit or deploy stages)?
  5. Long-Term Viability:
    • Is the package’s lack of activity a blocker? Are there maintained alternatives (e.g., composer-normalize, npm-check)?

Integration Approach

Stack Fit

  • CLI-First: Designed for terminal execution, not HTTP/APIs or Laravel’s HTTP layer.
  • Composer/NPM Agnostic: Works with any PHP/JS project, but no Laravel-specific optimizations (e.g., ignoring Laravel’s vendor symlinks or bootstrap/cache).
  • Output Format: Markdown is human-readable but requires parsing for programmatic use (e.g., converting to JSON for Laravel’s API documentation).

Migration Path

  1. Pilot Phase:
    • Test in a non-production Laravel project to validate Markdown output format and CLI integration.
    • Compare output with composer why-not and npm ls for accuracy.
  2. CI/CD Integration:
    • Add to composer.json scripts:
      "scripts": {
        "post-install-cmd": [
          "@hermes generate --output=docs/dependencies.md"
        ]
      }
      
    • Or invoke via GitHub Actions:
      - name: Generate Dependencies
        run: vendor/bin/hermes --all --output=docs/dependencies.md
      
  3. Documentation Workflow:
    • Automate Markdown file inclusion in README.md or a docs/ folder.
    • Use Laravel’s blade or markdown packages to render dependencies dynamically in the admin panel.

Compatibility

  • Laravel Versions: No version constraints; may work with LTS (8.x, 10.x, 11.x) but untested.
  • PHP Versions: Requires PHP 8.0+ (per Composer’s platform-check).
  • NPM/Yarn/Pnpm: Assumes package.json exists; may fail in projects using yarn or pnpm without npm compatibility layers.
  • Monorepos: Untested in Laravel + JS monorepos (e.g., laravel-mix or vite setups).

Sequencing

  1. Pre-Installation:
    • Audit existing dependency tools (e.g., composer why, npm-check).
    • Decide if Markdown output meets documentation needs or if JSON/API output is required.
  2. Installation:
    • Add to composer.json as a dev dependency:
      composer require --dev hermes/dependencies
      
  3. Testing:
    • Verify output for a small Laravel project (e.g., laravel/laravel).
    • Check for false positives (e.g., Laravel’s internal dependencies like illuminate/*).
  4. Production Rollout:
    • Integrate into CI/CD (e.g., post-merge or pre-deploy).
    • Document the dependencies.md file in the team’s onboarding process.

Operational Impact

Maintenance

  • Low Overhead: No Laravel-specific maintenance; updates are Composer-driven.
  • Dependency Bloat: Adds a dev dependency (~1MB) to the project.
  • Breakage Risk:
    • Future updates may change Markdown format (no backward-compatibility guarantees).
    • CLI arguments (--path, --output) could be deprecated without notice.

Support

  • Limited Community: No GitHub discussions, issues, or PRs to reference.
  • Debugging:
    • Errors (e.g., missing package.json) require manual troubleshooting.
    • No Laravel-specific error handling (e.g., if vendor/ is corrupted).
  • Alternatives:
    • For Composer: composer why-not <package> or composer show --tree.
    • For NPM: npm ls --all --depth=0 or madge --circular hermes-dependencies.

Scaling

  • Performance: Negligible impact; runs in milliseconds for typical Laravel projects.
  • Large Projects:
    • May slow CI/CD if run on monorepos with thousands of dependencies.
    • No parallel processing (e.g., extracting Composer and NPM dependencies simultaneously).
  • Distributed Teams:
    • Useful for cross-team documentation (e.g., backend/frontend dependency alignment).
    • Risk of outdated Markdown if not auto-generated in CI.

Failure Modes

Scenario Impact Mitigation
Missing composer.json CLI fails with error Add pre-check in CI/CD.
Missing package.json NPM dependencies skipped Configure --composer-only flag.
Corrupted vendor/ Composer dependency parsing fails Validate composer.lock first.
Markdown output parsing fail Documentation build errors Use a fallback template.
Package abandonment No future updates Fork or switch to composer why.

Ramp-Up

  • Developer Onboarding:
    • Pros: Simple CLI; output is self-documenting.
    • Cons: Requires manual setup in composer.json or CI.
  • Team Adoption:
    • Quick Win: Useful for new hires to understand dependency structure.
    • Resistance: May be seen as redundant if team already uses composer why.
  • Training:
    • Document the CLI flags (--composer, --package, --all) in the team wiki.
    • Example workflow:
      # Generate and commit dependencies.md in PRs
      git add docs/dependencies.md && git commit -m "chore: update dependencies"
      
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
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