PHPackages                             deoliveiralucas/copy-object-attributes-values - 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. deoliveiralucas/copy-object-attributes-values

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

deoliveiralucas/copy-object-attributes-values
=============================================

Simple helper to copy attributes values with the same name from one object to an other.

1.0.0(7y ago)025.8k↓33.3%MITPHP &gt;=7.1.0

Since Apr 27Pushed 6y agoCompare

[ Source](https://github.com/deoliveiralucas/copy-object-attributes-values)[ Packagist](https://packagist.org/packages/deoliveiralucas/copy-object-attributes-values)[ RSS](/packages/deoliveiralucas-copy-object-attributes-values/feed)WikiDiscussions master Synced 1mo ago

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

CopyObjectAttributesValues
==========================

[](#copyobjectattributesvalues)

[![Build Status](https://camo.githubusercontent.com/1fee1c2014a29459c84818dab6b6dbaebea4f0c8a9c99b631758f087d2af663c/68747470733a2f2f7472617669732d63692e636f6d2f64656f6c6976656972616c756361732f636f70792d6f626a6563742d617474726962757465732d76616c7565732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/deoliveiralucas/copy-object-attributes-values)[![Code Coverage](https://camo.githubusercontent.com/d53fa6a27469694096dec3f6372d5dfde859c750570bd9b0b42d6f507abc75f0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656f6c6976656972616c756361732f636f70792d6f626a6563742d617474726962757465732d76616c7565732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/deoliveiralucas/copy-object-attributes-values/?branch=master)[![Code Quality](https://camo.githubusercontent.com/4aad828ad72c239545232721d0ef80b4adb6c1e92901bcef1d4ed77eba6ef03c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f64656f6c6976656972616c756361732f636f70792d6f626a6563742d617474726962757465732d76616c7565732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/deoliveiralucas/copy-object-attributes-values/?branch=master)[![License MIT](https://camo.githubusercontent.com/db79b92834d905629b1aea42c9aa493da02060189e2af90840b1be5d6bf6ddf7/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f7374796c653d666c6174)](https://github.com/deoliveiralucas/copy-object-attributes-values/blob/master/LICENSE)[![Packagist](https://camo.githubusercontent.com/d43f90f0b1b667eb2b58cda7610c012f53b76cc32508882b57083639602ea11a/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64656f6c6976656972616c756361732f636f70792d6f626a6563742d617474726962757465732d76616c7565732e7376673f7374796c653d666c6174)](https://packagist.org/packages/deoliveiralucas/copy-object-attributes-values)

Simple helper to copy attributes values with the same name from one object to an other.

Installation
------------

[](#installation)

```
composer require deoliveiralucas/copy-object-attributes-values

```

Usage
-----

[](#usage)

```
use CopyObjectAttributesValues\CopyObjectAttributesValues;

class ObjectA {
    private $attributeA = 'ObjectA_AttrA';
    private $attributeB = 'ObjectA_AttrB';
}
class ObjectB {
    private $attributeA = 'ObjectB_AttrA';
    private $attributeB = 'ObjectB_AttrB';
    private $attributeC = 'ObjectB_AttrC';
}

$objectA = new ObjectA();
$objectB = new ObjectB();

CopyObjectAttributesValues::from($objectA)->to($objectB);

var_dump($objectB);

/*
Output:
class ObjectB#2 (3) {
  private $attributeA =>
  string(13) "ObjectA_AttrA"
  private $attributeB =>
  string(13) "ObjectA_AttrB"
  private $attributeC =>
  string(13) "ObjectB_AttrC"
}
*/
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

License
-------

[](#license)

CopyObjectAttributesValues is released under the MIT License. Please see [License File](LICENSE) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

2578d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9ac5a369bfeadbfdd07ff91d4315629ab90fc945cde3c2dac5ac1b17685cfd1?d=identicon)[deoliveiralucas](/maintainers/deoliveiralucas)

---

Top Contributors

[![lucasxciv](https://avatars.githubusercontent.com/u/5672800?v=4)](https://github.com/lucasxciv "lucasxciv (4 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/deoliveiralucas-copy-object-attributes-values/health.svg)

```
[![Health](https://phpackages.com/badges/deoliveiralucas-copy-object-attributes-values/health.svg)](https://phpackages.com/packages/deoliveiralucas-copy-object-attributes-values)
```

PHPackages © 2026

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