smmehdisharifi/laravel-msgpack
A Laravel integration for MessagePack, the compact binary serialization format. Encode and decode MessagePack data in PHP/Laravel apps for smaller payloads and efficient data exchange, with framework-friendly helpers and configuration.
data, links, and meta across offset- and cursor-based pagination, which is exactly where in-house solutions typically break.response()->msgpack(), with explicit macro arguments remaining authoritative, means teams can adopt binary responses without rewriting error/status conventions or header-based contracts.Consider adopting when:
data/links/meta intact — the core value of this release.Look elsewhere / defer when:
For executives: This is a low-risk, no-new-dependency upgrade that lets our Laravel APIs return more compact binary responses to clients that can use them, while keeping JSON for everyone else. The business case is straightforward — smaller payloads translate to lower bandwidth/egress cost and faster responses on mobile and constrained networks. There are no breaking changes, it works across the Laravel and PHP versions we already run, and there's a published benchmark to size the benefit before we commit. Recommended next step: a contained pilot on one high-traffic endpoint to quantify savings.
For engineering: v2.2.0 adds first-class MessagePack support for JSON resources and resource collections, correctly preserving data, links, and meta for both offset- and cursor-based pagination. response()->msgpack() now carries through resource status codes and custom headers, with explicit macro arguments still taking precedence — so existing contracts don't shift. Compatibility is unchanged (PHP 8.1–8.4, Laravel 9–12), there are no new runtime dependencies, and the release is validated by 52 tests / 191 assertions across the full PHP matrix plus strict Composer validation. Adoption is opt-in via existing HTTP negotiation, so we can roll out per-endpoint and roll back trivially.
How can I help you explore Laravel packages today?