PHPackages                             bartlomiejbeta/di-env-loader-bundle - 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. bartlomiejbeta/di-env-loader-bundle

ActiveSymfony-bundle

bartlomiejbeta/di-env-loader-bundle
===================================

v0.0.1(8y ago)0654MITPHPPHP ^7.0

Since Nov 27Pushed 8y ago2 watchersCompare

[ Source](https://github.com/bartlomiejbeta/DIEnvLoaderBundle)[ Packagist](https://packagist.org/packages/bartlomiejbeta/di-env-loader-bundle)[ RSS](/packages/bartlomiejbeta-di-env-loader-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

DIEnvLoaderBundle
=================

[](#dienvloaderbundle)

Easily load kernel environment dependent config files.

instalation
-----------

[](#instalation)

```
composer require bartlomiejbeta/di-env-loader-bundle

```

usage
-----

[](#usage)

### simple

[](#simple)

```
class ExampleExtension extends Extension
{
  use DIEnvLoaderTrait;

  public function load(array $configs, ContainerBuilder $container)
  {
    $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));

    self::loadByEnv($loader, $container, 'services', 'yml');
  }

}
```

configs will be load for all kernel environments.

- for example for `test` environment file `services-test.yml` located in `Resources/config` (and so on for other environment)

### configured

[](#configured)

```
class ExampleExtension extends Extension
{
  use DIEnvLoaderTrait;

  public function load(array $configs, ContainerBuilder $container)
  {
    $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/test'));

    if ('test' === self::getEnv($container))
    {
      self::loadByEnv($loader, $container, 'services', 'yml', '.');
    }
  }

}
```

configs will be load only for `test` kernel environment.

- file `services.test.yml` located in `Resources/config/test`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

3085d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74ae63f212d957f86bee321c97a221bc5a464d55ffe7871778bcf8ae17a685fc?d=identicon)[bartlomiejbeta](/maintainers/bartlomiejbeta)

---

Top Contributors

[![bartlomiejbeta](https://avatars.githubusercontent.com/u/17701206?v=4)](https://github.com/bartlomiejbeta "bartlomiejbeta (3 commits)")

---

Tags

dependency-injectionloaderenv

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bartlomiejbeta-di-env-loader-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/bartlomiejbeta-di-env-loader-bundle/health.svg)](https://phpackages.com/packages/bartlomiejbeta-di-env-loader-bundle)
```

###  Alternatives

[vlucas/phpdotenv

Loads environment variables from `.env` to `getenv()`, `$\_ENV` and `$\_SERVER` automagically.

13.5k602.4M5.4k](/packages/vlucas-phpdotenv)[symfony/dotenv

Registers environment variables from a .env file

3.8k226.7M2.2k](/packages/symfony-dotenv)[pimple/pimple

Pimple, a simple Dependency Injection Container

2.7k130.5M1.4k](/packages/pimple-pimple)[php-di/php-di

The dependency injection container for humans

2.8k48.9M991](/packages/php-di-php-di)[php-di/invoker

Generic and extensible callable invoker

26857.8M56](/packages/php-di-invoker)[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)

PHPackages © 2026

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