myclabs/deep-copy
DeepCopy creates safe deep clones of PHP objects, recursively copying referenced objects while preserving the original object graph. It handles cyclic references to avoid infinite loops, and supports customization via matchers and filters for specific properties and types.
__clone() implementation or circular reference errorsclone keyword)"DeepCopy is a battle-tested, zero-configuration solution for safely duplicating complex objects – handling circular references, Doctrine proxies, and custom cloning rules out of the box. It eliminates weeks of engineering effort and risk from building/maintaining custom cloning logic, while ensuring data integrity for critical features like content duplication and audit trails. With 8.8K+ GitHub stars, active maintenance, and MIT licensing, it's the industry-standard choice that accelerates delivery of cloning-dependent features without operational overhead."
How can I help you explore Laravel packages today?