nutgram/hydrator
nutgram/hydrator is a lightweight PHP library for turning arrays into typed objects, with support for nested DTOs, type casting, and attribute-driven mapping. It integrates smoothly with Nutgram and Laravel-style workflows, reducing boilerplate when working with API payloads and Telegram updates.
nutgram/hydrator is a narrow utility for mapping JSON payloads into typed DTOs. It fits best at application boundaries—HTTP/API clients, queue consumers, webhook handlers, and integration adapters—rather than in domain logic. In a Laravel/PHP codebase, it can reduce hand-written array-to-object mapping, but it is not a replacement for validation, authorization, persistence, or a full serialization layer.2026-07-24) that must be verified. Secondary risks include incomplete support for nested DTOs, collections, enums, readonly properties, union types, missing/extra JSON keys, and validation error semantics. Silent coercion or permissive hydration would be a correctness risk at API boundaries.Hydrator interface or thin service wrapper so package calls are centralized and reversible.How can I help you explore Laravel packages today?