PHPackages                             devmakerlab/entities - 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. devmakerlab/entities

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

devmakerlab/entities
====================

Work with entities from your services or repositories.

v3.1.2(4y ago)14.2k[1 PRs](https://github.com/devmakerlab/entities/pulls)2MITPHPPHP ^7.4|^8.0

Since Mar 12Pushed 4y agoCompare

[ Source](https://github.com/devmakerlab/entities)[ Packagist](https://packagist.org/packages/devmakerlab/entities)[ RSS](/packages/devmakerlab-entities/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (2)Versions (34)Used By (2)

DevMakerLab - Entities
======================

[](#devmakerlab---entities)

[![Run tests](https://github.com/devmakerlab/entities/workflows/Run%20tests/badge.svg)](https://github.com/devmakerlab/entities/actions)[![Code Coverage](https://camo.githubusercontent.com/0924913ff36334db72d2d08bdee54788a74fc113c1f5ec406de45048b7dbd9b9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6465766d616b65726c61622f656e7469746965732f6261646765732f636f7665726167652e706e673f623d6d617374657226733d64643163666634386531353436366162623538303663383364646363623136303338313462373739)](https://scrutinizer-ci.com/g/devmakerlab/entities/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/7289cf0ac63bb24c6d1a863ed2e8bc2852ae7b371c8cec8afe194352c9136530/68747470733a2f2f706f7365722e707567782e6f72672f6465766d616b65726c61622f656e7469746965732f762f737461626c65)](https://packagist.org/packages/devmakerlab/entities)

This package provide a way to implements entities. Useful for your services or repositories.

Usage
-----

[](#usage)

Create your entity in dedicated class :

```
use DevMakerLab\Entity;

class Human extends Entity
{
    public string $name;
    public int $age;
}
```

Then instanciate a new entity like that :

```
$human = new Human([
    'name' => 'Bob',
    'age' => 42,
]);

echo $human->name; // Bob
echo $human->age; // 42
```

Create your entity list like this :

```
use DevMakerLab\EntityList;

class People extends EntityList
{
    public function getYoungest(): Human
    {
        $entities = $this->entities;

        uasort($entities, function ($a, $b) {
            if ($a->age === $b->age) {
                return 0;
            }

            return ($a > $b) ? -1 : 1;
        });

        return array_pop($entities);
    }
}
```

Then instanciate a list like that :

```
$bob = new Human(['name' => 'Bob', 'age' => 45]);
$junior = new Human(['name' => 'Junior', 'age' => 21]);
$jane = new Human(['name' => 'Jane', 'age' => 31]);

$people = new People([$bob, $junior]);
$people[] = $jane;

echo $people[0]->name; // Bob
echo $people[1]->name; // Junior
echo $people->getYoungest()->name; // Junior
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 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

Every ~23 days

Recently: every ~82 days

Total

32

Last Release

1549d ago

Major Versions

v1.8.2 → v2.02020-12-29

v2.2.2 → v3.0.02021-03-29

PHP version history (5 changes)v1PHP ^7.2

v1.4PHP ^5.6

v1.4.3PHP ^5.6|^7.2

v1.8PHP ^7.4

v1.8.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/40eaec9651ea3b7c785ddd1a773c042869b187109de3665f10870b6b7d38438a?d=identicon)[Meinder-A](/maintainers/Meinder-A)

---

Top Contributors

[![william-suppo](https://avatars.githubusercontent.com/u/6459452?v=4)](https://github.com/william-suppo "william-suppo (52 commits)")[![meinder-a](https://avatars.githubusercontent.com/u/51158042?v=4)](https://github.com/meinder-a "meinder-a (10 commits)")[![DeGraciaMathieu](https://avatars.githubusercontent.com/u/11473997?v=4)](https://github.com/DeGraciaMathieu "DeGraciaMathieu (3 commits)")

---

Tags

serviceentityrepositorypattern

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/devmakerlab-entities/health.svg)

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

###  Alternatives

[getsolaris/laravel-make-service

A MVCS pattern create a service command for Laravel 5+

81161.3k](/packages/getsolaris-laravel-make-service)

PHPackages © 2026

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