PHPackages                             maslosoft/embedi - 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. maslosoft/embedi

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

maslosoft/embedi
================

Embedded Dependency Injection container

2.0.3(1y ago)07.2k[4 issues](https://github.com/Maslosoft/EmbeDi/issues)12AGPLPHPPHP &gt;=7.4

Since Dec 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Maslosoft/EmbeDi)[ Packagist](https://packagist.org/packages/maslosoft/embedi)[ Docs](https://maslosoft.com/embedi/)[ RSS](/packages/maslosoft-embedi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (34)Used By (12)

[![Embedi Logo](https://camo.githubusercontent.com/2647d9e246e9ae81d45f45627cb95efaf5f3826b9eaf0a19e640759f8af757bc/68747470733a2f2f6d61736c6f736f66742e636f6d2f656d626564692f656d626564692e737667)](https://maslosoft.com/embedi/) [Maslosoft Embe Di](https://maslosoft.com/embedi/)
======================================================================================================================================================================================================================================================================================

[](#-maslosoft-embe-di)

[*Embedded Dependency Injection container*](https://maslosoft.com/embedi/)

[![Latest Stable Version](https://camo.githubusercontent.com/c7494781ae69047db83152ad3bfc470edb7ba7875e22b12002d6e9f5fd156990/68747470733a2f2f706f7365722e707567782e6f72672f6d61736c6f736f66742f656d626564692f762f737461626c652e737667)](https://packagist.org/packages/maslosoft/embedi "Latest Stable Version")[![License](https://camo.githubusercontent.com/f4e80f4e2634b5a39e818bfc6f1375116a0395108dbbd7cf60618726021a5397/68747470733a2f2f706f7365722e707567782e6f72672f6d61736c6f736f66742f656d626564692f6c6963656e73652e737667)](https://packagist.org/packages/maslosoft/embedi "License")[ ![Scrutinizer Code Quality](https://camo.githubusercontent.com/bd65578c45e935a8b207df003e159d346634aacf1576d84d5e64e0dd7acd6906/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d61736c6f736f66742f456d626544692f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Maslosoft/EmbeDi/?branch=master)[ ![Code Coverage](https://camo.githubusercontent.com/aa67343073bc276328b18bd0ca96428e91d641ad769393c9f9784668da4fcfe8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4d61736c6f736f66742f456d626544692f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Maslosoft/EmbeDi/?branch=master)### Quick Install

[](#quick-install)

```
composer require maslosoft/embedi
```

### Documentation

[](#documentation)

[Full Embedi Documentation](https://maslosoft.com/embedi/docs/)

Configuring external PHP libraries
==================================

[](#configuring-external-php-libraries)

When developing project targeted at specific framework it is usually easy to allow developer using our library to configure it to his needs.

Each framework comes with some sort of configuration files, let it be YAML, or plain PHP config files. But each has a different format of this configuration, and different means to access this configuration in our library.

So when developing framework independent library - it usually comes with it own configuration scheme. So to allow it to be used with some framework it is required to add some kind of adapter - for each library and for each framework:

[![Without EmbeDi](https://camo.githubusercontent.com/7211588ff77d892543040acbc95e433a97e4c5f4497a503f12eb98998f272ff7/68747470733a2f2f6d61736c6f736f66742e636f6d2f656d626564692f656d626564692d6e6f742d757365642e706e67)](https://camo.githubusercontent.com/7211588ff77d892543040acbc95e433a97e4c5f4497a503f12eb98998f272ff7/68747470733a2f2f6d61736c6f736f66742e636f6d2f656d626564692f656d626564692d6e6f742d757365642e706e67)

Reusable adapter
----------------

[](#reusable-adapter)

EmbeDi aims to be reusable configuration adapter allowing dependency injection between frameworks, You project and other libraries.

The idea is that when developing reusable library - make it load configuration using EmbeDi - Embedded Dependency Injection.

Then use existing EmbeDi adapter to connect it to the framework, or our own project. Even if there are no adapter for specified framework or project, generic array adapter can be used.

[![With EmbeDi](https://camo.githubusercontent.com/331628465f280aa1728f68c53c26b144e6cd46938a317b6c787729aeb58c21b9/68747470733a2f2f6d61736c6f736f66742e636f6d2f656d626564692f656d626564692d757365642e706e67)](https://camo.githubusercontent.com/331628465f280aa1728f68c53c26b144e6cd46938a317b6c787729aeb58c21b9/68747470733a2f2f6d61736c6f736f66742e636f6d2f656d626564692f656d626564692d757365642e706e67)

Embedded dependency injection
-----------------------------

[](#embedded-dependency-injection)

Dependency injection allows us to build plug-in architecture without direct connections between components. This approach usually requires used libraries to be aware of used dependency injection (DI) container.

##### So DI container should be also dynamically configured?

[](#so-di-container-should-be-also-dynamically-configured)

EmbeDi allows You to include Dependency Injection container directly in your library.

It is kind of configuring dependency injection from bottom to top of our application. So each library has its own DI container, uses it to configure itself. Then on top of project we only instruct EmbeDi where configuration is stored.

Resources
---------

[](#resources)

- [Project website](http://maslosoft.com/embedi/)
- [Project Page on GitHub](https://github.com/Maslosoft/EmbeDi)
- [Report a Bug](https://github.com/Maslosoft/EmbeDi/issues)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance40

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity74

Established project with proven stability

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

Recently: every ~698 days

Total

33

Last Release

502d ago

Major Versions

0.0.9 → 1.0.02015-03-09

1.1.1 → 2.0.02022-02-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0c790d4fc70028f2628e8dfd67b12a75eb8cc7c9e9db8c8347b5660c336f21c?d=identicon)[pmaselkowski](/maintainers/pmaselkowski)

---

Top Contributors

[![pmaselkowski](https://avatars.githubusercontent.com/u/520283?v=4)](https://github.com/pmaselkowski "pmaselkowski (105 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/maslosoft-embedi/health.svg)

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

PHPackages © 2026

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