gnugat/marshaller
gnugat/marshaller is a small, framework-agnostic PHP library for marshalling data: it converts arrays into objects and objects back into arrays through configurable builders and extractors, making it easy to map raw input to domain objects in any project.
The v1.1.0 release adds collection-aware marshalling: Marshaller can iterate a collection and invoke the appropriate MarshallerStrategy per element. This is a meaningful feature for Laravel/PHP package consumers because it reduces custom map()/loop code and centralizes polymorphic transformation logic. Decision: treat as a low-risk, opt-in capability; adopt where collection marshalling is needed, but do not mandate a package-wide upgrade until compatibility and collection semantics are verified.
MarshallerStrategy abstraction and may replace ad hoc per-element loops.Illuminate\Support\Collection, Eloquent collections, LazyCollection, paginators, generators)? How is the “appropriate” strategy selected—type mapping, container binding, priority, fallback? Does it recurse into nested collections? What happens on unsupported elements or strategy exceptions—fail-fast, partial output, or collected errors? Are keys preserved? Does it return a collection or array? Is behavior opt-in and backward compatible under semver? What are the PHP/Laravel version constraints?MarshallerStrategy implementations. Confirm that existing strategies do not assume they are called only for single objects.LazyCollection/paginated sources for memory and query behavior. Per-element strategy calls may add overhead; confirm whether iteration is streaming or materializing results.How can I help you explore Laravel packages today?