- Can Hermes/dependencies be used to generate dependency documentation for a Laravel project?
- Yes, Hermes generates Markdown reports of Composer and NPM dependencies, which is useful for Laravel projects needing clear documentation. The output can be manually integrated into your project’s README or docs folder. However, it doesn’t enforce Laravel-specific rules or validate compatibility between packages.
- How do I install Hermes in a Laravel project?
- Run `composer require --dev hermes/dependencies` to install it as a dev dependency. After installation, execute it via `vendor/bin/hermes` in your project root. No additional Laravel configuration is required since it operates at the project level.
- Does Hermes support Laravel’s semantic versioning (e.g., ^8.0 vs ~8.0) or conflict detection?
- No, Hermes does not validate Laravel-specific version constraints or detect conflicts between packages like `laravel/framework` and `illuminate/support`. It only extracts dependencies without runtime checks or Laravel integration.
- Can I use Hermes in a CI/CD pipeline for Laravel deployments?
- Yes, you can integrate Hermes into CI/CD by adding it to your `composer.json` scripts or running it directly in workflows. For example, add `"post-install-cmd": ["@hermes generate --output=docs/dependencies.md"]` to automate dependency documentation generation during deployments.
- Will Hermes work with Laravel 11.x or only older versions?
- Hermes has no explicit Laravel version constraints, but it requires PHP 8.0+. While it may work with Laravel 11.x, it hasn’t been tested or optimized for Laravel-specific features. Always test in a staging environment first.
- Does Hermes support NPM/Yarn/Pnpm lock files, or just package.json?
- Hermes only reads `package.json` and ignores lock files like `yarn.lock` or `pnpm-lock.yaml`. This could lead to inconsistencies in projects using these tools, especially in monorepos or hybrid PHP/JS setups.
- How can I customize the output path or format for Hermes?
- Use the `--output` flag to specify a custom path (e.g., `--output=docs/dependencies.md`). The output is always Markdown, which is human-readable but requires manual parsing or additional tools to integrate with Laravel’s documentation systems like `laravel/docs`.
- Are there alternatives to Hermes for Laravel dependency management?
- For Composer, consider `composer why-not` or `composer show` for dependency inspection. For NPM, tools like `npm ls --all` or `madge` provide dependency graphs. Laravel-specific alternatives include `composer-normalize` for dependency updates or custom Artisan commands for runtime validation.
- Can Hermes detect transitive dependencies (e.g., symfony/console) or only direct ones?
- Hermes extracts both direct and transitive dependencies by default, which may include packages like `symfony/console` pulled in by Laravel. This could lead to misleading documentation if not filtered, as transitive dependencies aren’t always critical to your project’s runtime.
- Is Hermes actively maintained, or should I look for another package?
- Hermes has low activity (1 star, no dependents) and is single-author maintained. While it may suit documentation needs, its lack of updates and Laravel-specific features could pose long-term risks. Evaluate alternatives like `composer-normalize` or `npm-check` for critical dependency management.