kerox/messenger
Kerox Messenger is a flexible PHP library for adding private messaging to your app. It provides threads, participants, and messages out of the box, with a storage-agnostic design, Doctrine support, and optional Laravel integration for quick setup.
Architecture fit
MessengerGateway interface and implement it with this library, so controllers/jobs never touch the vendor API directly. This preserves the option to swap for the official Facebook SDK or raw Graph calls later.Integration feasibility
php-http/discovery behavior in the app's dependency graph.AppServiceProvider (or a dedicated provider) constructed from config('services.messenger.page_token') and app secret; no package config file exists, so configuration lifecycle is entirely yours.X-Hub-Signature-256 validation, payload parsing, and 200-response discipline are application responsibilities unless the package covers them.Technical risk
Key questions
X-Hub-Signature-256 and parse webhook entry/messaging arrays, or is that entirely on us?Stack fit
Migration path
MessengerGateway interface, and cut over per message type.MessageReceived, PostbackReceived, ReferralReceived) at the boundary; this is the durable asset and makes the library replaceable.Compatibility
composer why-not during the spike.php-http/discovery may auto-select an adapter — pin the intended client explicitly to avoid environment-dependent behavior across local/CI/production.Sequencing
Maintenance
.env in production at scale).Support
Scaling
RateLimiter or Redis::throttle) and exponential backoff on 613/2018001.mid/message ID.Failure modes
Ramp-up
How can I help you explore Laravel packages today?