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 today

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

2044d 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

[pclzip/pclzip

A PHP library that offers compression and extraction functions for Zip formatted archives

19412.9M4](/packages/pclzip-pclzip)[rilwis/meta-box

The most powerful &amp; comprehensive plugin to create, manage, show and connect dynamic data with forms and custom fields effortlessly on WordPress.

1.2k1.8k1](/packages/rilwis-meta-box)[typo3/cms-form

TYPO3 CMS Form - Flexible TYPO3 frontend form framework that comes with a backend editor interface.

147.1M185](/packages/typo3-cms-form)

PHPackages © 2026

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