# myclabs/DeepCopy

Create deep copies (clones) of your objects

Repository: https://github.com/myclabs/DeepCopy
Canonical: https://ross.abutalabs.com/products/deepcopy
Language: PHP
License: MIT
License Family: permissive
Topics: clone, clone-deep
Last push: 2026-08-12T13:04:59+00:00

## Health v2 (maintenance only)
Score: 93/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 85, longevity 100
- inputs: {"age_days": 4790, "days_push": 21, "days_rel": 22, "gap_med": 71.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8886, forks 109 (observed 2026-08-28T04:10:26.153005+00:00)

## What it is
A PHP library that creates deep copies (clones) of objects, recursively copying all referenced objects while handling cycles in the association graph. It offers configurable matchers and filters to customize which properties are copied and how.

## Use cases
- deep clone a php object graph
- copy objects with circular references
- clone doctrine entities safely
- create deep copies without writing __clone methods
- customize which properties get copied during cloning
- snapshot object state for testing

## When to choose
- you need deep copies of complex object graphs in PHP
- your object graph contains cycles that break naive cloning
- you use Doctrine and need to clone entities with collections
- you want configurable copy behavior via matchers and filters

## When to avoid
- you only need shallow copies (plain clone suffices)
- you are not working in PHP
- your objects hold uncloneable resources like open connections

## Facets
- artifact type: library
- maturity: stable
- function: serialization
- domain: developer-tools, programming-languages
- platform: php
- tags: deep-copy, object-cloning, object-graph, cycles

## Member repositories
- myclabs/DeepCopy (main) score 93

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:26.153005+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:24:44.628028+00:00, confidence not recorded.
  - readme: https://github.com/myclabs/DeepCopy (fetched 2026-08-28T04:10:26.153005+00:00, sha dec31bd710d8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
