symfony/mailer or spatie/laravel-mail).MailInterface for templates, which could be rigid for teams preferring dynamic email generation (e.g., Laravel’s Mailable classes). The requirement to escape Twig variables ({{ '{{' }}...) adds unnecessary complexity for Laravel’s native templating.disjfa_mail.yaml), which is redundant in Laravel (where routes are typically defined in routes/web.php or API controllers). This could complicate CI/CD pipelines or monolithic Symfony-Laravel hybrids.Illuminate/Mail, Mailable classes, Markdown emails) is mature and diverges from Symfony’s patterns. Key mismatches:
Mailable classes with @component directives (Blade) or raw strings, not MailInterface.Mailer is event-driven (e.g., sending hooks), while this bundle appears to be route/controller-based.Mailer with Laravel’s SwiftMailer/Symfony Mailer adapter.EmailService interface) would be more maintainable than this bundle.Mailable classes to implement MailInterface.HttpFoundation components in Laravel tests.Mail::to()->send() or queued jobs.Mail::later()) outperform route-based solutions. Does this bundle offer async support?MailInterface may limit use cases.symfony/mailer) already in use? If so, could this bundle integrate with them without Laravel?spatie/laravel-mailables) be lower risk?Mailer component.Translator, Twig Environment).MailInterface in a Laravel-compatible facade (e.g., LaravelMailAdapter).Mailable classes, SwiftMailer, etc.).MailInterface.Mailer via process or HTTP).@component('mail.template')
{{ $greeting }}, {{ $user->name }}
@endcomponent
{{ '{{' }} $greeting {{ '}}' }}, {{ '{{' }} user.name {{ '}}' }}
// app/Facades/LaravelMailFacade.php
public static function send(MailInterface $mail) {
$symfonyMailer = app(SymfonyMailer::class);
$email = (new Email())
->from(new Address($mail->getFrom()))
->to(new Address($mail->getTo()))
->subject($mail->getSubject())
->html($mail->getContent());
$symfonyMailer->send($email);
}
Artisan commands to trigger the bundle’s logic without HTTP routes.| Feature | Symfony Support | Laravel Workaround | Risk |
|---|---|---|---|
| Twig Templates | Native | Requires Blade→Twig conversion | High (template refactoring) |
| Blade/Markdown | No | Not supported; must rewrite | Critical |
| Queueing | No | Manual integration with Laravel queues | Medium |
| Notifications | No | Custom event listeners | Medium |
| SwiftMailer | No | Use Symfony Mailer adapter | Low |
| API Routes | Native | Not applicable; use internal calls | High |
| Translations | Native | Inject Translator via service provider |
Low |
| Testing | PHPUnit/Symfony | Mock Symfony components in Laravel tests | Medium |
Mailable classes with MailInterface implementations.Mailer for Symfony; adapt for Laravel via facade.disjfa_mail routes (if using Symfony).Mailer component.telescope for mail logs).How can I help you explore Laravel packages today?