Product Decisions This Supports
- Build vs. buy on email delivery. This SDK lets us consume MailerLite as a managed email service instead of building list management, campaign scheduling, deliverability, and unsubscribe/compliance handling ourselves. That is the single biggest decision this package informs: it makes "buy the ESP, build only the integration" a credible, low-effort option.
- Channel expansion on the roadmap. If we are sequencing acquisition/retention features, this package gives us a nearly complete surface area for a lifecycle-email MVP: subscriber create/update/delete, groups (list buckets), segments (dynamic cohorts), fields (custom attributes), forms (lead capture signups), campaigns (create → schedule → cancel), automations (read + activity), and webhooks (event push back into our app).
- Feature scoping through API coverage. The breadth of the exposed APIs (including e-commerce products/orders/customers and batch operations) is a de facto capability checklist. If a proposed feature maps to an endpoint here, it is integration work, not new product work — useful for sizing and for killing scope that MailerLite already does better (e.g., building our own drip engine, building our own form builder).
- Sync architecture and data ownership. Webhooks + subscribers + groups means we can decide whether MailerLite is the system of record for email preferences or whether our app is and MailerLite is a downstream projection. That is a real product decision (opt-in state, consent audit, GDPR deletion flows) that this package makes cheap to implement either way.
- Vendor-swap optionality. Because this is a thin HTTP wrapper over a documented REST API rather than an opinionated framework, the switching cost to another ESP is mostly our own adapter layer, not a rewrite. That lowers the stakes on the vendor selection decision and argues for wrapping it behind our own interface from day one.
- Trial/validation decision. Given the low adoption signal (35 stars, 0 dependents), the right near-term decision is a time-boxed spike behind an internal interface, not a roadmap commitment.
When to Consider This Package
Adopt when:
- MailerLite is already (or is about to be) the chosen ESP, and we want the vendor-maintained client rather than hand-rolling Guzzle calls against the REST API.
- We need broad, boring CRUD coverage across subscribers, groups, segments, fields, forms, campaigns, automations, and webhooks — this package covers all of it with a consistent
->resource->method() shape.
- We want webhook-driven flows (e.g.,
subscriber.created triggering in-app provisioning) with a documented payload contract.
- We need batch operations or e-commerce object sync for segmentation by purchase behavior.
- Our runtime is PHP 7.4–8.x and we can live with the PSR-7/PSR-18 discovery requirement.
Look elsewhere or pause when:
- You want a first-class Laravel integration. This is a framework-agnostic PHP SDK: no service provider, no facade, no config publishing, no queue-aware transport, no Laravel HTTP-client integration. We would write a thin wrapper (bind a singleton, pull the key from
config/services.php, add a retry/timeout policy) — small, but it is our code and our maintenance.
- Transport friction is a problem. The PSR discovery step ("Could not find resource using any discovery strategy") is a recurring onboarding/CI failure mode; it means pulling in
php-http/curl-client, guzzlehttp/psr7, and php-http/message unless the app already has a PSR-18 implementation. In a Laravel app this is redundant weight against the built-in HTTP client.
- You need strong ecosystem proof. 35 stars and 0 dependents means no community safety net and little third-party documentation. Support is effectively vendor-only, and our team is the first to hit edge cases.
- The API surface you need is narrow. If the requirement is "send a transactional email," an ESP-agnostic mailer (or Laravel's mail system) is simpler and keeps us vendor-portable. This SDK is for marketing automation, not transactional sending.
- You need typed responses, pagination ergonomics, or first-class error objects. The README shows raw response arrays and does not document error/rate-limit handling; we should assume we own retries, backoff, and 429 handling.
Adoption criteria before committing: confirm PHP 8.2/8.3 compatibility in our own CI, confirm the release cadence (releases are current), confirm license fit (MIT — fine), and require a written wrapper interface so the SDK is swappable.
How to Pitch It (Stakeholders)
To executives (30 seconds): This is the official PHP client for MailerLite, our email marketing vendor. It is a small, MIT-licensed, actively released integration library — not a platform bet. Using it means we get newsletters, segmentation, drip automations, signup forms, and purchase-based targeting without building or operating any of that ourselves. The commercial decision is the ESP subscription; this package just makes the integration a one-to-two-sprint item instead of a multi-month build. The risk is low because it is a thin wrapper: if we ever change vendors, we replace one adapter, not a subsystem.
To engineering (the honest version): Framework-agnostic PHP SDK, PHP 7.4+, resource-style API (subscribers, campaigns, groups, segments, fields, forms, automations, webhooks, plus e-commerce and batch). It requires a PSR-18 HTTP client and PSR-7 implementation to be discoverable — in Laravel that means either adding the php-http packages or injecting our own client. No service provider, no facade, no retry logic, no typed DTOs, no documented error model. Plan on ~1 day of wrapper work: config binding, timeout/retry/429 handling, response normalization, and a MailerLiteClient interface so nothing in our domain code imports the vendor namespace. Tests: the package ships CI for tests and PHPStan, which is a reasonable quality signal, but we should still contract-test against a sandbox key.
To the team (decision framing): Treat this as a reversible, time-boxed spike behind an interface. Approve it if (a) MailerLite is the ESP, (b) we accept owning a thin adapter, and (c) we agree the domain layer never sees vendor classes. Reject or defer if the requirement is transactional email, if we are still vendor-shopping, or if a Laravel-native wrapper already covers our needs with better ergonomics.