PHPackages                             yassinebenaid/eldia - 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. yassinebenaid/eldia

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

yassinebenaid/eldia
===================

Eldia is a lightweight PHP package that provides developers with a set of extra helpers

1.1(3y ago)4131MITPHPPHP ^8.1

Since Feb 18Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Joodek/Eldia)[ Packagist](https://packagist.org/packages/yassinebenaid/eldia)[ RSS](/packages/yassinebenaid-eldia/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Eldia
=====

[](#eldia)

[![](https://camo.githubusercontent.com/d68a085df9d68d5611b1c1fef196d6f7637b19ce6a7683ebf22d0b6e2113c9e6/68747470733a2f2f707265766965772e726564642e69742f327975613262337237626237312e706e673f77696474683d3634302663726f703d736d617274266175746f3d7765627026733d38643131383166393130386630633938623365633166396332633563383334316364346435366138)](https://camo.githubusercontent.com/d68a085df9d68d5611b1c1fef196d6f7637b19ce6a7683ebf22d0b6e2113c9e6/68747470733a2f2f707265766965772e726564642e69742f327975613262337237626237312e706e673f77696474683d3634302663726f703d736d617274266175746f3d7765627026733d38643131383166393130386630633938623365633166396332633563383334316364346435366138)

Eldia is a lightweight PHP package that provides developers with a set of extra helpers to simplify common programming tasks. The library is designed to be easy to use, with an elegant and intuitive syntax that makes it easy to add powerful functionality to your PHP applications.

The Eldia package includes a variety of helpers that can be used for tasks like working with arrays, manipulating strings, generating random data, dealing with exceptions and more. These helpers are designed to be easy to integrate into your code, and they can help you to write cleaner, more efficient PHP code.

installation
------------

[](#installation)

```
    composer require joodek/eldia

```

Features
--------

[](#features)

#### Promises

[](#promises)

have you used Javascript promises, if so then you probably like them , I like them , now you can use them in php like this :

```
 use Eldia\Promise\Promise;

 Promise::make(function ($success, $reject) {

        if (0) {
            $success('hello world');
        } else {
            $reject('error');
        }
    })

        ->then(fn ($message) => print($message), fn ($reason) => print($reason))

        ->catch(fn ($exception) => print($exception->getMessage()));

```

you can use how many `then` you like , everytime you use it , you have access to the latest returned data , see example

```
Promise::make(function ($success, $reject) {

    $var = 5 + 5;

    if ($var === 10) $success($var);
    else $reject($var);
})
  ->then(fn ($data) => $data + 5)
  ->then(fn ($data) =>  print  $data) // 15

```

that's available in both , `success` and `reject` callbacks, and you can even avoid using the `reject` at all :

```
 Promise::make(function ($success) {

        if (0) {
            $success('hello world');
        } else{
            // do somthing
        }
    })

        ->then(fn ($message) => print($message))

```

during the promise callbacks , you're safe from all types of errors , excep the syntax errors , which means that whatever happend in the callbacks, no error will occur , it will just stop executing the callbacks, but , for some reason you want to execute some code when an error occurs , you can use `catch` ,

```
 Promise::make(function ($success) {

        if (0) {
            $success('hello world');
        } else{
            throw new Exception('error');
        }
    })

        ->catch(fn ($exception) => print($exception->getMessage())) // prints "error"

```

you can even catch specific error by just typing hint the exception type , typed exception will only be exceuted if it matches the type :

```
 Promise::make(function ($success) {

    $str = "baz";

    if ($str === "foo") {
        $success('hello world');
    } else {
        throw new ValidationException('error');
    }
})

    ->catch(fn (AuthException $exception) => print($exception->getMessage())) // won't works
    ->catch(fn (ValidationException $exception) => print($exception->getMessage())); // prints "error"

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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 ~0 days

Total

2

Last Release

1180d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9012457ef64e3df95f78c72e26a5a27e412873ba5fdc8dde146bc30951c47dd6?d=identicon)[yassinebenaid](/maintainers/yassinebenaid)

---

Top Contributors

[![yassinebenaid](https://avatars.githubusercontent.com/u/101285507?v=4)](https://github.com/yassinebenaid "yassinebenaid (19 commits)")

### Embed Badge

![Health badge](/badges/yassinebenaid-eldia/health.svg)

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

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

320392.1k17](/packages/codewithdennis-filament-select-tree)[naif/address_autocomplete

An address field that autocomplete the user input to show suggested addresses using Google Place service.

1722.7k](/packages/naif-address-autocomplete)

PHPackages © 2026

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