rekalogika/doctrine-collections-decorator
Decorators for Doctrine Collections that wrap existing collections to add behavior such as read-only enforcement without changing the underlying classes. Drop-in compatible with Doctrine's Collection interface, so they work in entities and repositories alike.
rekalogika/doctrine-collections-decorator provides a set of reusable decorators for Doctrine Collections, letting you wrap existing collections with added behavior without modifying your entities or breaking type compatibility.
Each decorator implements Doctrine\Common\Collections\Collection, so it drops into existing code seamlessly while adding capabilities such as read-only enforcement or pagination.
Collection with a read-only decorator to prevent accidental mutationHow can I help you explore Laravel packages today?