PHPackages                             mickprev/duplicator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mickprev/duplicator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mickprev/duplicator
===================

Library for duplicate an object (or an array of objects) using PHP annotations.

v1.0.0(6y ago)47MITPHPPHP &gt;=7.2CI failing

Since Oct 28Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mickprev/duplicator)[ Packagist](https://packagist.org/packages/mickprev/duplicator)[ Docs](https://github.com/mickprev)[ RSS](/packages/mickprev-duplicator/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (14)Versions (2)Used By (0)

Duplicator
==========

[](#duplicator)

Library for duplicate an object (or an array of objects) using PHP annotations.

Getting started
---------------

[](#getting-started)

```
composer require mickprev/duplicator
```

```
use MickPrev\Duplicator\Annotation\Groups;

class Product
{
    // ...
    /**
      * @Groups({"my_group"})
      */
     private $title;
    // ...
}

$duplicator = new ChainDuplicator(
    [
        new IterableDuplicator(),
        new ObjectDuplicator(),
        new DefaultDuplicator(),
    ]
);

$newProduct = $duplicator->duplicate($originalProduct, ['groups' => ['my_group']]);
```

What the duplicator does not do yet
-----------------------------------

[](#what-the-duplicator-does-not-do-yet)

- Duplicate object with arguments in the constructor that have no default value.
- 'Iterable' duplicator returns a value with the same type that the value to duplicate instead of always return an array.

Extras
------

[](#extras)

- [Use case](doc/USE_CASE.md)
- [Add a business logic](doc/BUSINESS_LOGIC.md)
- [Use library with Symfony](doc/SYMFONY_BRIDGE.md)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2391d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17760158?v=4)[Mick Prev](/maintainers/mickprev)[@mickprev](https://github.com/mickprev)

---

Top Contributors

[![mickprev](https://avatars.githubusercontent.com/u/17760158?v=4)](https://github.com/mickprev "mickprev (2 commits)")

---

Tags

cloneduplicate

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mickprev-duplicator/health.svg)

```
[![Health](https://phpackages.com/badges/mickprev-duplicator/health.svg)](https://phpackages.com/packages/mickprev-duplicator)
```

###  Alternatives

[myclabs/deep-copy

Create deep copies (clones) of your objects

8.9k849.8M169](/packages/myclabs-deep-copy)[symfony/var-exporter

Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects

2.1k378.1M441](/packages/symfony-var-exporter)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[verbb/cloner

Easily clone sections, entry types, groups and more.

25178.7k](/packages/verbb-cloner)[jackabox/nova-duplicate-field

A Laravel Nova field to duplicate records.

30111.5k](/packages/jackabox-nova-duplicate-field)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
