Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Deep Copy Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: DeepCopy integrates seamlessly with Laravel's Eloquent ORM for deep cloning complex object graphs, especially where Laravel's native clone is insufficient. It handles cycles in relationships (e.g., parent-child models) and supports custom filtering for ID resetting or relationship management. However, Laravel's Eloquent-specific magic (e.g., dynamic properties) may require custom filter configuration since the package doesn't natively understand Eloquent's internal state.

Integration feasibility: High. Composer installation is trivial (composer require myclabs/deep-copy), and the API is simple (DeepCopy::copy($object)). Integration requires minimal code changes but careful filter configuration for Laravel-specific scenarios (e.g., resetting IDs, handling relationships). Doctrine-specific filters are unnecessary for pure Eloquent projects but useful if Doctrine is used alongside Laravel.

Technical risk: Low to moderate. The package is actively maintained (recent PHP

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope