setono/meta-conversions-api-php-sdk
PHP SDK for the Meta Conversions API that lets you send server-side conversion events to Meta/Facebook with typed requests, event models, and a simple client for integrating online and offline conversions into PHP or Laravel apps.
User/Event objects, reads pixel ID/access token from config/secrets, and owns logging, retry, and queueing. It requires PHP 8.1+ and a PSR-18 HTTP client with PSR-17 factories; Laravel’s HTTP client is not PSR-18, so a Guzzle/Symfony adapter is likely needed.Fbp::$randomNumber is private, User::$fbc/$fbp are typed as Fbc|string|null, withCreationTime() accepts int|\DateTimeInterface, and fluent methods declare static returns. Coming from beta.2, most apps are unaffected unless they directly mutated randomNumber, assigned invalid Fbc/Fbp values (now TypeError), or caught InvalidArgumentException from withCreationTime(). Coming from 1.x, follow UPGRADE-2.0.md.TypeError is PHP’s programming-error type and does not implement ExceptionInterface, so exception handling must account for it. The SDK is synchronous and external-dependency-heavy, and provides no Laravel service provider, facade, or config lifecycle.event_id)? What is the consent/privacy policy for server-side events? Which PSR-18/17 implementation will be bound? What queue/retry/alerting policy applies? Should the beta be pinned exactly or allowed via ^2.0@beta?UPGRADE-2.0.md, validate payload mapping, stricter types, and exception handling. From beta.2, usually no change unless accessing Fbp::$randomNumber directly, assigning non-Fbc/Fbp/string/null values to User::$fbc/$fbp, or relying on withCreationTime() throwing InvalidArgumentException.^2.0@beta) or pin an exact beta version. No framework lifecycle hooks are provided.composer.lock management; exception behavior may still change before 2.0 stable. Stricter types reduce bad-state bugs but can surface TypeErrors after upgrades. Keep the SDK behind an internal wrapper to isolate future changes.TypeError from invalid assignments, and partial multi-pixel failure. Log correlation IDs and event_id, track delivery outcomes, and alert on failure spikes.How can I help you explore Laravel packages today?