PHPackages                             patienceman/deper - 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. patienceman/deper

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

patienceman/deper
=================

One line Dependencies Injections for laravel and php

v1.0.2(3y ago)12.7kMITPHP

Since Aug 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/patiencemanzen/Deper)[ Packagist](https://packagist.org/packages/patienceman/deper)[ RSS](/packages/patienceman-deper/feed)WikiDiscussions main Synced 1mo ago

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

Deper from Patienceman
======================

[](#deper-from-patienceman)

Deper is a dependency injector, which is able to inject even more than 4 classes in a simple way and is reliable, So now we are able to use multiple classes functions at once, 💯 🎆

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

[](#installation)

Installing the package doesn't require much requirement except to paste the following command in the laravel terminal, and you're good to go.

```
composer require patienceman/deper
```

Usage
-----

[](#usage)

It is easy to deal with this package, however, when you start to inject heavy classes, like thousand functions, it will take a while to find your function, and adds up to API / execution time. So once the installation is done! you need to create a new class file! for example

```
namespace App\Dependencies;

use Patienceman\Deper\Dependencies;

class PatientDependencies extends Dependencies {
    /**
     * Class constructor.
     */
    public function __construct() {
        return $this->boot();
    }

    /**
     * Resources to be injected
     *
     * @return array
     */
    public function injections(): array {
        return [
            \App\Services\Mood::class, // or new Mood()
            \App\Services\Energy::class, // or new Energy()
            \App\Actions\Move::class // or new Move()
        ];
    }
}
```

You can apply even to many classes to be injected, Just put it inside the injection return array. So now on let's use our dependencies anywhere we want!

```
namespace App\Http\Controllers;

use App\Dependencies\PatientDependencies;
use Illuminate\Http\Request;

class TestController extends Controller {
    /**
     * Store a newly created resource in storage.
     *
     * @param PatientDependencies $dependency
     * @return \Illuminate\Http\Response
     */
    public function store(PatientDependencies $dependency) {
       return $dependency->mood(); // or $dependency->energy();
    }
}
```

Woow 😄 ⭐ 🌟 , that amazing step forward we made! See!, easy-peasy!

class inheritance
-----------------

[](#class-inheritance)

So now that was the easy step to use!, let see how the inheritance work for dependencies!, Note: we will use the above example

```
namespace App\Services;

use App\Dependencies\PatientDependencies;

class Human extends PatientDependencies {
    /**
     * Class constructor.
     */
    public function __construct() {
        parent::__construct();
    }

   /**
     * Possess a new spirit
     *
     * @return string
     */
    public function Spirit () {
        $this->mood();
        $this->energy();
        return "spirit created and possessed successfully";
    }
}
```

That was awesome right? 👍 🤙 🚑

Let use trait
-------------

[](#let-use-trait)

So now on let's use traits to make it easier, Note: with current example

```
namespace App\Services;

use Patienceman\Deper\Injectable;

class Human {
    use Injectable;

    protected $dependencies = [
         \App\Services\Mood::class, // or new Mood()
         \App\Services\Energy::class, // or new Energy()
         \App\Actions\Move::class // or new Move()
    ];

    /**
     * Class constructor.
     */
    public function __construct() {
        $this->inject($this->dependencies);
    }

   /**
     * Possess a new spirit
     *
     * @return string
     */
    public function Spirit () {
        $this->mood();
        $this->energy();
        return "spirit created and possessed successfully";
    }
}
```

This is so amazing! 💯 😄

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

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

3

Last Release

1356d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/90353f39cc87c27ae67eb7503409539cb8fe8f879fa749cb3e51458cad85c00c?d=identicon)[Manirabona-patience](/maintainers/Manirabona-patience)

---

Top Contributors

[![patiencemanzen](https://avatars.githubusercontent.com/u/55847682?v=4)](https://github.com/patiencemanzen "patiencemanzen (5 commits)")

---

Tags

composerdependencylaravelphpphplaraveldependenciesinjections

### Embed Badge

![Health badge](/badges/patienceman-deper/health.svg)

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

###  Alternatives

[amranidev/laracombee

Recommendation system for laravel

11636.7k1](/packages/amranidev-laracombee)[salmanzafar/laravel-geocode

A Laravel Library to find Lat and Long of a given Specific Address

153.9k](/packages/salmanzafar-laravel-geocode)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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