- Can I use HermesBundle in Laravel without Symfony’s dependency injection?
- No, HermesBundle is designed for Symfony’s DI container. To use it in Laravel, you’ll need a bridge like `spatie/laravel-symfony-mailer` to integrate Symfony Mailer into Laravel’s container. Alternatively, create a custom service provider to bind HermesBundle’s services manually.
- How do I configure HermesBundle for SMTP in Laravel?
- HermesBundle relies on Symfony’s `services.yaml` for configuration. For Laravel, map your `.env` SMTP settings (e.g., `MAIL_MAILER=smtp`, `MAIL_HOST`) to Symfony’s transport configuration in a custom Laravel service provider or via `spatie/laravel-symfony-mailer`.
- Does HermesBundle support Laravel’s Blade templating engine?
- No, HermesBundle uses Twig exclusively. To integrate Blade, you’d need a bridge like `spatie/laravel-twig-view` or duplicate templates in Twig. Alternatively, evaluate alternatives like Laravel’s native `illuminate/mail` for Blade support.
- Is HermesBundle compatible with Laravel’s queue system for emails?
- Yes, but indirectly. HermesBundle uses Symfony Mailer, which supports transports like SMTP and API-based services. Ensure your Laravel queue worker processes Symfony Mailer’s transports (e.g., via `spatie/laravel-symfony-mailer`) to defer email sending.
- What Laravel versions does HermesBundle support?
- HermesBundle itself doesn’t specify Laravel support—it’s Symfony-centric. However, with `spatie/laravel-symfony-mailer`, it can work in Laravel 8.x–10.x. Test thoroughly, as Symfony Mailer’s Laravel compatibility depends on the bridge’s maintenance.
- How do I remove CruditBundle dependencies if I don’t need the admin panel?
- Fork the repository and strip CruditBundle-related code (e.g., routes, entities) or use Composer’s `replace` directive to exclude unused parts. Alternatively, create a wrapper service provider to isolate HermesBundle’s core email functionality.
- Are there better Laravel-native alternatives to HermesBundle?
- Yes. For templated emails, consider `laravel-notification-channels/mail` (for notifications) or `spatie/laravel-activitylog` (for event-driven emails). For admin-driven campaigns, Laravel’s native `illuminate/mail` with a custom dashboard may suffice.
- How do I test HermesBundle in Laravel before production?
- Mock Symfony Mailer’s transport in tests using `symfony/mailer`'s `NullTransport` or a custom test transport. For Laravel-specific tests, verify queue jobs (if using queues) and template rendering via `spatie/laravel-twig-view` or Blade-Twig bridges.
- Will HermesBundle work with Laravel’s Horizon for queue monitoring?
- Indirectly, if you configure Symfony Mailer’s transports to use Laravel’s queue system via `spatie/laravel-symfony-mailer`. Monitor queued emails in Horizon by ensuring Symfony Mailer’s `AsyncTransport` or similar is used for deferred sending.
- What’s the long-term viability risk of HermesBundle for Laravel projects?
- High. With low adoption (2 stars, 0 dependents) and Symfony-centric design, HermesBundle may stagnate. Mitigate risks by forking the repo, monitoring GitHub activity, or switching to Laravel-native solutions like `spatie/laravel-mail` if maintenance becomes an issue.