- How do I install eventhomes/laravel-mandrillhooks?
- Install it with Composer using the package name eventhomes/laravel-mandrillhooks, then check the README for any service provider or route registration steps because older Laravel packages may not support auto-discovery. Validate the Composer constraints against your Laravel and PHP versions before committing. After installation, point your Mandrill webhook URL at the provided route and test with sample payloads in a non-production environment.
- Which Laravel and PHP versions does this package support?
- The last release was in March 2020, so its Composer constraints likely target Laravel 5.x or 6.x era applications and PHP 7.x. Modern Laravel and PHP 8+ versions may conflict with those constraints. Check composer.json before adoption, and vendor or fork the controller if you need compatibility with a current Laravel release.
- Does this package verify Mandrill webhook signatures?
- You should not assume that signature verification is complete or tested. Review the controller source and confirm whether it validates Mandrill's X-Mandrill-Signature header using your webhook key. If verification is missing or unclear, add it in your own controller or fork before exposing the endpoint publicly.
- Which Mandrill events can I handle with this package?
- The package is described as a base controller for catching bounced, rejected, open, click, and spam events, but you should verify exactly which Mandrill event types it maps. Mandrill can also send unsub, inbound, and other event payloads depending on your webhook settings. Map every received event to an internal domain action instead of relying on package-specific event names.
- Is it safe to use this package in production if it is unmaintained?
- Treat it as a small reference implementation or a candidate for a fork rather than a strategic dependency. Upstream maintenance is minimal, adoption is low, and the last release was in 2020, so you must own compatibility checks, security review, and tests. If you adopt it, pin the exact release, isolate it behind your own webhook controller, and add monitoring for verification and processing failures.
- How should I process Mandrill webhooks asynchronously in Laravel?
- The webhook controller should validate the request, persist the raw payload, dispatch a queued job, and return a fast 200 response. Do the business work, such as updating suppression lists or notifying users, inside the queued job rather than in the HTTP request. Add retry and dead-letter handling so temporary failures do not lose bounce or reject events.
- How do I prevent duplicate Mandrill webhook processing?
- Mandrill and your infrastructure may retry webhook deliveries, so store a unique event identifier or a hash of the raw payload and enforce a unique constraint before processing. Use that identifier as an idempotency key in your queued job. This prevents duplicate emails, repeated suppression updates, or multiple internal tickets for the same bounce event.
- What are the alternatives to eventhomes/laravel-mandrillhooks?
- The most practical alternative is a small custom Laravel webhook controller that validates the Mandrill signature, stores the payload, and queues processing. Because the package is MIT licensed and small, you can also vendor or copy its controller into your codebase and add the missing security and tests. For non-Laravel services, implement the endpoint in your native stack instead of adopting this package.
- Can I use this package outside Laravel or with Lumen?
- No, it is a Laravel controller layer and is not designed as a framework-agnostic Mandrill webhook library. Lumen may require adaptation because routing, service providers, and controller behavior differ from full Laravel. For non-Laravel PHP or other stacks, implement a native webhook endpoint and reuse only the Mandrill event handling ideas.
- How do I test Mandrill webhook handling in Laravel?
- Write feature tests that post sample Mandrill payloads to your webhook route and assert the expected domain actions and queue dispatches. Include tests for invalid or missing signatures, malformed JSON, hard bounce, soft bounce, reject, spam, and unsubscribe paths. Also test duplicate delivery behavior so idempotency and retry handling are verified before production.