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

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

jdomenechb/promised-entities
============================

Fetch entities or value objects asynchronously by using promises

v0.1.3(5y ago)17MITPHPPHP ^7.1|^8

Since Oct 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jdomenechb/promised-entities)[ Packagist](https://packagist.org/packages/jdomenechb/promised-entities)[ RSS](/packages/jdomenechb-promised-entities/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Promised Entities
=================

[](#promised-entities)

[![Actions Status](https://github.com/jdomenechb/promised-entities/workflows/Main%20workflow/badge.svg)](https://github.com/jdomenechb/promised-entities/actions)[![codecov](https://camo.githubusercontent.com/ca42b37bbe9d1a5cb2f38e3e0c0b2661766d9fe9367802063ff67c849a31e1da/68747470733a2f2f636f6465636f762e696f2f67682f6a646f6d656e656368622f70726f6d697365642d656e7469746965732f6272616e63682f6d61737465722f67726170682f62616467652e7376673f746f6b656e3d345a4c54533650513138)](https://codecov.io/gh/jdomenechb/promised-entities)

Have you ever wondered how you can integrate asynchronous PHP features with code structures like Domain Driven Design?

This library, among other uses, will allow you to use promises to instantiate objects asynchronously without having to compromise your code structure or use third-party classes in contract definition.

[What does this library try to solve?](docs/what-does-this-library-try-to-solve.md)

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

[](#installation)

Run in the root of your project:

```
composer require jdomenechb/promised-entities

```

Usage
-----

[](#usage)

```
// ...

$promisedEntityFactory = PromisedEntityFactory::create(new GuzzleMethodBodyGenerator());
$promisedEntityFactory->build(YourEntity::class, $promise);
```

`$promise` is the Promise instance which resolution will return the loaded entity. It should match the given `MethodBodyGenerator` class which will know how to deal with it.

An example of implementation using this library can be seen in the [test src files](src-test/Infrastructure/GuzzlePromiseStudentRepository.php).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Every ~1 days

Total

4

Last Release

2045d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1197b4ce0411048910993d1b98874c69f8811614aefc414b012d0eb7e4c7a314?d=identicon)[jdomenechb](/maintainers/jdomenechb)

---

Top Contributors

[![jdomenechb](https://avatars.githubusercontent.com/u/11862227?v=4)](https://github.com/jdomenechb "jdomenechb (24 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[coderevolutionplugins/gpt-3-encoder-php

PHP BPE Text Encoder/Decoder for GPT-2 / GPT-3

10046.1k](/packages/coderevolutionplugins-gpt-3-encoder-php)[kartik-v/yii2-label-inplace

A form enhancement widget for Yii2 allowing in-field label support.

1181.2k](/packages/kartik-v-yii2-label-inplace)

PHPackages © 2026

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