jeffersongoncalves/laravel-newsletter
A Laravel package for managing newsletter subscribers and mailing lists, offering simple tools to subscribe, unsubscribe, and send newsletters from your application. It integrates cleanly with Laravel's ecosystem, making email list handling and newsletter delivery straightforward and easy to configu...
Architecture fit
web middleware group. That is the correct default: session, cookie encryption, CSRF, and $errors sharing are all prerequisites for a server-rendered subscribe + confirm flow.$errors, which is only populated by ShareErrorsFromSession — a web-group middleware. The package had a hard, unstated dependency on being mounted behind web and did not declare it. 2.0.1 closes that gap, but the coupling is worth noting: any host app that deliberately overrides the package's middleware will reintroduce the failure.Integration feasibility
composer update, clear route/config/view caches, re-publish views if the 2.0.0 form assets were published and customized.web middleware brings CSRF enforcement to the subscribe POST. Any custom frontend, headless/SPA consumer, embedded form on a third-party site, or cached subscribe page will now receive 419 Page Expired unless a token is supplied. This is correct behavior but is a functional change for non-Blade consumers.Technical risk
ErrorException on every request to the new subscribe form — the package's primary conversion path. That indicates no fresh-install, route-level smoke test (a single request to /subscribe in a bare Laravel app would have caught it). Treat 2.0.x as a young major line and pin versions.web also introduces Set-Cookie and session start on the track (open-pixel) and webview routes — a behavior change with CDN caching and privacy-consent implications that the release notes do not address.1.x → 2.x upgraders: the 2.0.0 notes are not in this dataset, so breaking changes for existing installs are unverified.Key questions
Mailable/notification class names, DB columns) for apps still on 1.x?web middleware group hard-coded, or configurable per-route? Can we opt the track pixel out of session/cookie handling for CDN friendliness?VerifyCsrfToken except path?track route write any cookie or PII, and does that change our consent posture (GDPR/ePrivacy) for EU recipients?Stack fit
boot() route registration, Route::middleware('web')->group(...)). Confirm the illuminate/support constraint in composer.json against our pinned Laravel version before adopting.Migration path
composer update vendor/package, then php artisan route:clear && php artisan config:clear && php artisan view:clear (stale cached routes are the most likely reason the fix appears not to apply), then php artisan route:list --path=<package-prefix> to confirm the web middleware column.Compatibility
track and webview paths now that responses may carry Set-Cookie.Sequencing
route:list.Maintenance
~2.0.1 (or 2.0.* with a floor) to avoid re-entering a broken 2.0.0 state on a loose constraint.Support
composer show) as the first step in the runbook for subscribe-related incidents.419 Page Expired from users on cached pages or from custom/headless integrations. Pre-write the triage note now.Scaling
web group starts a session and issues cookies on every public route hit. For open-tracking pixels (track), which are high-volume and bot-heavy, this means session storage writes and uncacheable responses.track from session middleware.track/webview is effectively lost while Set-Cookie is present — relevant if open rates are high or the sender reputation relies on fast pixel responses.Failure modes
route:clear in the deploy script.VerifyCsrfToken exception; monitor 419 rate.web silently reintroduces the 2.0.0 $errors crash. Mitigation: add a regression test asserting a 200 on GET /subscribe.APP_KEY and session driver per environment.track request volume, not just error rate.Ramp-up
How can I help you explore Laravel packages today?