funnelchat20/wapi-gateway
Laravel/PHP package that provides a gateway to the WAPI WhatsApp API, helping you send messages, manage instances, handle webhooks, and centralize API configuration. It offers a simple, configurable interface for building WhatsApp automation and notifications in your applications.
Architecture fit: The package now clearly spans two subsystems, and the two reviewed releases landed in different ones. v0.22.7 addressed observability in the Z-API operations client (ZApiClient/ZApiLite, centralized logRequest() into device_logs, unsubscribe() brought to parity with logout()). v0.23.3 addresses data correctness in the shared-contact vCard formatter, preventing a duplicated country code from being written into the exported card. Architecturally these are the same class of defect viewed from opposite ends: the unsubscribe gap produced a high-consequence action with no trace, while the vCard defect produces a durable but silently wrong artifact — a phone number that looks plausible and fails only when someone tries to dial or import it. Note the asymmetry that remains: the unsubscribe path now has a logging chokepoint, but the vCard path has no equivalent — a malformed number is not logged, flagged, or rejected, so detection depends entirely on human report. That is the standing architectural gap this release does not close.
Integration feasibility: High for the code change itself — a single-line-style normalization fix, no new dependency, no API change described. The integration complication is versioning, not code: the prior assessment recommended ^0.22.7, but the current artifact is v0.23.3, meaning a minor release (0.23.0) and three patch releases intervened and are unreviewed here. Under 0.x semver a minor bump is permitted to break, so the constraint recommendation must move to ^0.23.3 only after the 0.23.0–0.23.2 changelog is read. Treating this as "just a patch on top of 0.22.7" is the most likely integration mistake.
Technical risk: Low-to-moderate.
+55 default with a local number starting 55…) can be over-stripped by a naive "remove the duplicate prefix" rule. Any fix in this class needs positive and negative test cases, not just the reported one.step discriminator question (new device_logs column vs. JSON key), the synchronous-logRequest()-can-abort-unsubscribe question, sanitizeUrl() coverage on URL-shape drift, and unsubscribe idempotency all remain open — nothing in this release note answers them.Key questions:
step a persisted column (migration) or a payload key, and is logRequest() guaranteed log-and-continue inside unsubscribe()?sanitizeUrl() mask tokens in query strings and headers, or only /token/<token>/ path segments?unsubscribe() idempotent, and are retries de-duplicated in device_logs?^0.22.x and therefore carry both the unsubscribe observability gap and the vCard defect?Stack fit: Unchanged and clean — standard Laravel/Eloquent app with an existing device_logs layer, plus a contact-sharing path that emits vCards. No queue, cache, or driver implications. The new work is confined to output formatting for shared contacts; it does not touch persistence.
Migration path: Bump the Composer constraint from ^0.22.7 to ^0.23.3. Because this crosses a minor version, review the 0.23.0 changelog before bumping rather than assuming additive-only. No config publish or credential rotation. If the earlier step question resolves to a persisted column, run the package migration in the same deploy; if it is a payload key, no migration applies.
Compatibility: Two independent compatibility surfaces now:
device_logs consumers — additive method=unsubscribe rows plus a step field. Strict schemas and method allowlists are the likely break point.Sequencing:
^0.23.3 in staging and generate a before/after diff of vCards from a fixed contact corpus that includes: a plain national number, a number already carrying the country code, an ambiguous number whose national prefix matches the country code, and a non-default-country number.disconnect failure, forced integrator cancel failure) to confirm the 0.22.7 behavior survived the minor bump, plus the logging-failure path.method=unsubscribe grouped by step) and any vCard snapshot fixtures before production rollout.Operational Impact
Maintenance: Low ongoing cost, but the standing items are now two: (a) periodic scans of device_logs URLs for token-shaped substrings, converting the sanitizeUrl() heuristic into a verifiable control; (b) a golden-corpus test of vCard generation across country-code edge cases, because this defect class recurs whenever default-country defaults or number formats change. The second is the cheaper of the two to institutionalize and the more likely to be needed again.
Support: Mixed but net positive. The vCard fix should reduce a specific, hard-to-diagnose ticket class ("the contact card shows a number that doesn't work") that support currently cannot reproduce without the customer's exact input. However, the fix is forward-only: contacts shared before the upgrade still carry the malformed number, so expect a tail of reports that the fix does not resolve and prepare a re-share/re-export answer for them. The unsubscribe observability gain from 0.22.7 continues to pay off on billing and cancellation disputes, provided the step runbook query actually exists.
Scaling: No throughput impact from either change. Unsubscribe logging adds two low-frequency writes per churn event; vCard generation is per-share, not per-message. Ensure device_logs is indexed on method and a stable device/instance identifier so support queries stay cheap.
Failure modes:
disconnect succeeding while integrator cancel fails still requires an operator.device_logs schema consumers and vCard snapshot/import consumers are both plausible break points for what is nominally an additive patch.Ramp-up: Roughly half a day for a team already on the package: changelog review across the unreviewed 0.23.x releases, constraint bump, the vCard golden-corpus diff, and a re-run of the unsubscribe branch and logging-failure exercises. Teams new to the package need the two-leg disconnect/cancel model explained, a short device_logs schema walkthrough, and — new to this release — a briefing on the phone-normalization rules (default country code, E.164 expected input shape), since that assumption is the entire substance of the vCard change.
How can I help you explore Laravel packages today?